p1-email-verification-resend-ui
readytype/backlogpriority/p1severity/mediumtopic/authtopic/ux
p1 · Email verification resend UI on login
TL;DR
Wire the existing requestEmailVerification server action to the login experience so unverified users can resend the verification email without guessing URLs or contacting support.
Description
- Problem:
requestEmailVerification exists in src/lib/actions/emailVerification.ts (enumeration-safe, rate-limited) but no page calls it. Login toast says “or request a new one” (AuthContext.tsx) with no control to do so.
- Context: Verification gate and signup verify flow are done ([[Projects/personal-finance-notion/backlog/done/p0-c2-email-verification|C2 done]]).
Acceptance criteria
- [ ] On login failure with
email_not_verified, show a Resend verification email control (button or link) that calls requestEmailVerification({ email })
- [ ] After submit, show generic success copy (same whether email exists / already verified — action already returns
{ success: true })
- [ ]
data-testid on interactive targets; POM + guest E2E covers resend → new email captured (extends [[Projects/personal-finance-notion/backlog/p2-auth-token-flow-edge-e2e|token edge E2E]] or email-verify.spec.ts)
Implications
If skipped
- Users who lose the first verification email face support friction or account abandonment; they only see a toast hint with no action. Security gate works but recovery UX is incomplete.
Why this priority
- p1 — user-visible gap on a shipped verification gate; small scope but blocks recovery without support. Not p0 because sign-up and verify happy-path already work.
When shipped
- Matches audit “resend verification path”; closes the gap between server action and product UI.
Dependencies
- None (action + email stub already exist for E2E).
Links
- App repo:
src/app/(auth)/login/page.tsx, src/components/auth/AuthContext.tsx, src/lib/actions/emailVerification.ts