Improve login UX for unconfirmed email + resend confirmation

- LoginForm: detect 403 separately, show amber warning with email address
- Add 'Resend confirmation email' button (calls POST /api/auth/resend-confirmation)
- Backend: POST /api/auth/resend-confirmation endpoint (generates new token, resends email)
- api.ts: add resendConfirmation method

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 19:05:55 +03:00
parent 352d22a101
commit e3f37744b0
3 changed files with 93 additions and 11 deletions

View File

@@ -161,6 +161,9 @@ export const api = {
resetPassword: (token: string, password: string) =>
req<{ ok: boolean }>('POST', '/api/auth/reset-password', { token, password }),
resendConfirmation: (email: string) =>
req<{ ok: boolean }>('POST', '/api/auth/resend-confirmation', { email }),
},
// ── Rooms ─────────────────────────────────────────────────────────────────