-
Notifications
You must be signed in to change notification settings - Fork 0
Password reset flow not functional (endpoints exist but no email sending) #11
Copy link
Copy link
Open
Description
Description
Password reset endpoints exist but don't actually work because no email backend is configured. Users who forget their password have no way to recover their account.
Steps to Reproduce
- Call
POST /auth/forgot-passwordwith{"email": "user@example.com"} - Response is
202 Accepted - No email is sent - user never receives reset token
- User cannot complete password reset
Expected Behavior
User should receive an email with a reset link/token to change their password.
Actual Behavior
Endpoint accepts the request but no email is sent. Reset token is generated internally but never delivered.
Root Cause
fastapi-users provides password reset infrastructure but requires:
- Email backend configuration (SMTP, SendGrid, AWS SES, etc.)
- Implementation of
on_after_forgot_passwordhook in UserManager to send emails - Frontend UI for forgot-password and reset-password flows
None of these are implemented.
Files involved:
backend/api/auth.py:32-36- mounts reset_password_routerbackend/core/user_manager.py- missingon_after_forgot_passwordhookfrontend/- no forgot-password or reset-password pages
Possible Solutions
-
Option A: Implement full email-based password reset
- Configure email backend (add SMTP/SendGrid credentials to
.env) - Implement
on_after_forgot_passwordhook to send reset emails - Add frontend pages for forgot-password and reset-password
- Configure email backend (add SMTP/SendGrid credentials to
-
Option B: Remove/disable endpoints if not planning to implement
- Don't mount
get_reset_password_router()inauth.py - Document that password reset is not available
- Don't mount
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels