fix(auth): guard verify page and correct signup OTP flow#36
Open
omarelkhal wants to merge 1 commit into
Open
Conversation
Redirect cold /verify visits without context to /register, send the correct email-verification OTP on load, and verify signup with emailOtp.verifyEmail instead of signIn.emailOtp. Also fix inverted dev cookie settings and log OTPs when using the log email provider so local testing matches the docs. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@omarelkhal is attempting to deploy a commit to the Revoks Lab Team on Vercel. A member of the Team first needs to authorize it. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/verify?fromSignup=true: redirect to/registerwhen there is noverificationEmailin sessionStorage and no session email (fixes empty “sent to your email” dead-end).email-verificationOTP on mount; resend uses the same type fromfromSignup.client.emailOtp.verifyEmail()for signup, notclient.signIn.emailOtp()./dashboardwhenemailVerifiedis true./register(not/signup).useSecureCookies/crossSubDomainCookies; log OTP to console whenEMAIL_PROVIDER=log(matches docs).Test plan
Manual (port 3002,
EMAIL_PROVIDER=log, PostgresshipfreeDB):http://localhost:3002/verify?fromSignup=true→ must land on/register./verify?fromSignup=trueshows your email; terminal logs🔑 VERIFICATION CODEwithtype: email-verification./dashboardwith session cookies set.Automated check used Playwright against the above (all passed on
fix/verify-page-guards).Related
Separate branch
fix/unverified-email-recovery— do not merge into this PR.Upstream issue body:
ISSUE-verify-page.mdinshipfree-contribution/.