Skip to content

Fix: account conflict detection and email verification on signup#50

Merged
theredmoose merged 1 commit into
mainfrom
fix/auth-account-linking-and-email-verification
Feb 23, 2026
Merged

Fix: account conflict detection and email verification on signup#50
theredmoose merged 1 commit into
mainfrom
fix/auth-account-linking-and-email-verification

Conversation

@theredmoose

Copy link
Copy Markdown
Owner

Summary

Account conflict (Google/Facebook sign-in with existing email)

  • useAuth now detects auth/account-exists-with-different-credential during social sign-in and stores the conflicting email in new accountConflictEmail state
  • AuthForm watches this state and auto-switches to sign-in mode with the email pre-filled, plus shows an amber guidance banner: "This email already has an account. Enter your password below to sign in."
  • Error message improved to "Please sign in with email and password instead."
  • onClearAccountConflict called when user manually switches modes

Email verification

  • signUpWithEmail now calls sendEmailVerification after account creation (best-effort — failure is caught silently so signup still succeeds)
  • Authenticated users with unverified email/password accounts see an amber banner: "Please verify your email address." with a "Resend email" button
  • resendVerification action added to useAuth / useAuth.ts types and auth.ts service

Test plan

  • All 516 tests pass

🤖 Generated with Claude Code

Account conflict detection:
- useAuth now detects auth/account-exists-with-different-credential during
  Google/Facebook sign-in and surfaces the conflicting email via new
  accountConflictEmail state
- AuthForm auto-switches to sign-in mode and pre-fills the email field
  when a conflict is detected, plus shows an amber guidance banner
- getAuthErrorMessage updated to give actionable advice for this case

Email verification:
- signUpWithEmail now calls sendEmailVerification after account creation
  (best-effort — signup succeeds even if verification email fails)
- App.tsx shows an amber banner to email/password users who haven't
  verified their address yet, with a "Resend email" button
- resendVerification action added to useAuth and auth service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@theredmoose theredmoose merged commit 720ece3 into main Feb 23, 2026
1 check failed
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.

1 participant