-
Notifications
You must be signed in to change notification settings - Fork 64
Rework how email verification works #3784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f84ccda
5d69b34
8db3642
ee33e9c
75526ff
1f83b39
0513f19
5f5fc44
23b019c
e0f4882
dbb5316
3da27af
a294b37
0bedaf3
f8517a5
621b648
36aa1a0
f50a386
5851584
02db622
1ec6192
ef74d47
6092efe
ef077d0
7e6ab8f
244ec18
a83cdfb
8d50088
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| -- Copyright 2025 New Vector Ltd. | ||
| -- | ||
| -- SPDX-License-Identifier: AGPL-3.0-only | ||
| -- Please see LICENSE in the repository root for full details. | ||
|
|
||
| -- Add a table for storing email authentication sessions | ||
| CREATE TABLE "user_email_authentications" ( | ||
| "user_email_authentication_id" UUID PRIMARY KEY, | ||
| "user_session_id" UUID | ||
| REFERENCES "user_sessions" ("user_session_id") | ||
| ON DELETE SET NULL, | ||
| "email" TEXT NOT NULL, | ||
| "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, | ||
| "completed_at" TIMESTAMP WITH TIME ZONE | ||
| ); | ||
|
|
||
| -- A single authentication session has multiple codes, in case the user ask for re-sending | ||
| CREATE TABLE "user_email_authentication_codes" ( | ||
| "user_email_authentication_code_id" UUID PRIMARY KEY, | ||
| "user_email_authentication_id" UUID | ||
| NOT NULL | ||
| REFERENCES "user_email_authentications" ("user_email_authentication_id") | ||
| ON DELETE CASCADE, | ||
| "code" TEXT NOT NULL, | ||
| "created_at" TIMESTAMP WITH TIME ZONE NOT NULL, | ||
| "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL, | ||
| CONSTRAINT "user_email_authentication_codes_auth_id_code_unique" | ||
| UNIQUE ("user_email_authentication_id", "code") | ||
| ); |
Uh oh!
There was an error while loading. Please reload this page.