AfterClass-io / afterclass.io-v2

[alpha] v2 of https://afterclass.io!
https://afterclass-io.vercel.app
MIT License
4 stars 2 forks source link

fix: explicit redirect to login instead of root #132

Closed davidlhw closed 2 months ago

davidlhw commented 2 months ago

Context

Current signup flow redirects user to the root /

Ever since change was made to let root / exempted from auth middleware at bced73beaba553bcd66df71d46b6b228ccfe4573, the redirect now pauses at root with the user not being signed in, requiring 1 extra click to be directed to login which is poor UX

Changes

Add emailRedirectTo option when signUp is called with email & password credentials, allowing redirect to be explicitly to /account/auth/login so the user will login after confirming their email

New Flow

  1. user click sign up
  2. user input email + pwd & cfm pwd
  3. user redirects to /account/auth/verify page to let user know that email is sent
  4. user receives email
  5. user clicks link on email & gets directed to /account/auth/confirm-signup page with a button that calls supabase api on click + a redirect url
  6. user clicks button & gets redirected to /account/auth/login
  7. user logins with credentials
  8. end of flow
vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
afterclass-io-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 7:27pm