-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The is_verified field exists on the User model and email verification endpoints exist, but the feature is non-functional and the field is never used for access control.
Steps to Reproduce
- Register a new user -
is_verifiedisFalse - Call
POST /auth/request-verify-email- returns202but no email sent - User has no way to get verification token
- User can access all features despite
is_verified=False
Expected Behavior
Either:
- Email verification should work (send email, user verifies, gains access to features)
- Or
is_verifiedshould be removed/hidden if not needed
Actual Behavior
is_verified=Falsefor all users (except seeded admin)- No email sent when requesting verification
- Nothing in the app checks
is_verified- users have full access regardless - Field is only displayed in admin UI
Root Cause
- No email backend configured
on_after_request_verifyhook not implemented in UserManager- No routes use
current_verified_userdependency - onlycurrent_active_useris used - No frontend UI for email verification
Files involved:
backend/api/auth.py:38-42- mounts verify_routerbackend/core/user_manager.py- missingon_after_request_verifyhookbackend/core/users.py- only definescurrent_active_user, notcurrent_verified_user
Possible Solutions
-
Option A: Implement full email verification
- Configure email backend
- Implement
on_after_request_verifyhook - Add frontend verification UI
- Decide which routes require verified users and use
current_verified_user
-
Option B: Remove if not needed
- Don't mount
get_verify_router() - Remove
is_verifiedfrom API responses (or document it's not used) - Keep field in DB for potential future use
- Don't mount
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels