fix: email verification redirect and already-used token message
1. Use window.location.href instead of navigate() for reliable redirect 2. Improve backend error message for already-used verification tokens 3. Show user-friendly message when token was already verified 4. Reduce redirect delay from 2s to 1.5s for better UX Fixes: - Empty page after email verification - Generic error when clicking verification link twice Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1521c2f221
commit
1cd93d521e
2 files changed
+23
-13
No files matched your search
@@ -289,7 +289,9 @@ async def verify_email(token: str):
|
||||
prof = cur.fetchone()
|
||||
|
||||
if not prof:
|
||||
raise HTTPException(400, "Ungültiger Verifikations-Link")
|
||||
# Token not found - might be already used/verified
|
||||
# Check if there's a verified profile (token was deleted after verification)
|
||||
raise HTTPException(400, "Verifikations-Link ungültig oder bereits verwendet. Falls du bereits verifiziert bist, melde dich einfach an.")
|
||||
|
||||
if prof['email_verified']:
|
||||
raise HTTPException(400, "E-Mail-Adresse bereits bestätigt")
|
||||
|
||||
Reference in new issue
Block a user