Skip to content
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

[auth] Implement OTP to verify email during signup #25

Merged
merged 6 commits into from
Oct 27, 2023

Conversation

adityapawar1
Copy link
Collaborator

@adityapawar1 adityapawar1 commented Oct 21, 2023

What's new in this PR

  • Changes the email template to include a verification code
  • Adds a new screen after sign-up
    • you can enter the verification code
    • you can resend the verification code (expires the previously sent code)

Relevant Links

None

Notion Sprint Task

Sprint Task

Online sources

https://supabase.com/docs/reference/javascript/auth-resend
https://supabase.com/docs/reference/javascript/auth-verifyotp?example=verify-signup-one-time-password%28otp%29

Related PRs

None

How to review

  • Test verification email
    • Create a new account (you can use 10minutemail.net for a temp email)
    • Enter an invalid code
    • Enter the code sent to the email (should take you to the home screen)
    • Log out and log in with the new account to confirm it was verified
  • Test Resend Code
    • Sign up, click resend code
    • Try entering the old code (should be invalid)
    • Enter the new code (should take you to home)
    • Log out and log in with the new account to confirm it was verified

Next steps

None

Tests Performed, Edge Cases

Above in how to review

Screenshots

Verification code screen:
IMG_3030

CC: @akshaynthakur

Copy link
Collaborator

@akshaynthakur akshaynthakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple nits, make sure to fix routing so that verified email takes user to onboarding instead of home, but LGTM otherwise!

src/app/auth/verify.tsx Outdated Show resolved Hide resolved
src/app/auth/verify.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@akshaynthakur akshaynthakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@akshaynthakur akshaynthakur merged commit ef71e4f into main Oct 27, 2023
2 checks passed
@akshaynthakur akshaynthakur deleted the adi/otp-signup branch October 27, 2023 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants