-
Notifications
You must be signed in to change notification settings - Fork 81
feat(auth): email verification via 6-digit code #2824
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
Closed
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f456738
feat(auth): add email verification code flow with cooldown enforcement
baktun14 ef74992
fix(auth): address CodeRabbit review findings for email verification
baktun14 5081f3c
fix(auth): address PR review feedback for email verification
baktun14 ba6cbc1
test(auth): add tests for notification template and EmailVerification…
baktun14 2b643ec
fix(auth): address remaining PR review comments for email verification
baktun14 a3caa58
fix(auth): handle OTP autofill and improve API test coverage
baktun14 2833d6c
fix(auth): auto-advance after email verification and fix cooldown timer
baktun14 2f609e3
fix(onboarding): prevent setState during render in email verification…
baktun14 3f59cc7
fix(onboarding): always apply full cooldown on user-initiated resend
baktun14 4d2351e
fix(onboarding): apply full cooldown on auto-send and simplify timing
baktun14 f8176a2
feat(auth): add resend flag to prevent duplicate emails on page refresh
baktun14 79f5403
refactor(onboarding): replace inline error alert with toast notification
baktun14 1c3375f
fix(onboarding): move verifying state into button and fix snackbar DO…
baktun14 60aceb2
feat(onboarding): move initial code send to server-side and improve v…
baktun14 baf3edb
test(auth): add UserService unit tests for verification code send on …
baktun14 e26bd68
fix(auth): fix integration test mock and update docs snapshot
baktun14 584c3b1
fix(auth): prevent transaction rollback from undoing attempt increment
baktun14 8e99257
feat(auth): implement signup functionality and add related tests
baktun14 b555c3a
fix(auth): harden email verification security and fix review findings
baktun14 9227c20
test(auth): update docs snapshot for z.literal(true) response schema
baktun14 5b8aa9f
fix(auth): address PR review - simplify verification service and impr…
baktun14 8d44066
test(auth): update docs snapshot for simplified verification endpoints
baktun14 6f673de
fix(auth): move Auth0 call outside transaction and sanitize signup 40…
baktun14 07be485
refactor(auth): extract VerificationCodeInput from EmailVerificationStep
baktun14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| CREATE TABLE IF NOT EXISTS "email_verification_codes" ( | ||
| "id" uuid PRIMARY KEY DEFAULT uuid_generate_v4() NOT NULL, | ||
| "user_id" uuid NOT NULL, | ||
| "email" varchar(255) NOT NULL, | ||
| "code" varchar(64) NOT NULL, | ||
| "expires_at" timestamp NOT NULL, | ||
| "attempts" integer DEFAULT 0 NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL | ||
| ); | ||
| --> statement-breakpoint | ||
| DO $$ BEGIN | ||
| ALTER TABLE "email_verification_codes" ADD CONSTRAINT "email_verification_codes_user_id_userSetting_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."userSetting"("id") ON DELETE cascade ON UPDATE no action; | ||
| EXCEPTION | ||
| WHEN duplicate_object THEN null; | ||
| END $$; | ||
| --> statement-breakpoint | ||
| CREATE INDEX IF NOT EXISTS "email_verification_codes_user_id_idx" ON "email_verification_codes" USING btree ("user_id");--> statement-breakpoint | ||
| CREATE INDEX IF NOT EXISTS "email_verification_codes_expires_at_idx" ON "email_verification_codes" USING btree ("expires_at"); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.