diff --git a/services/api/app/api/auth.py b/services/api/app/api/auth.py index afd06ca..e79fcd9 100644 --- a/services/api/app/api/auth.py +++ b/services/api/app/api/auth.py @@ -12,6 +12,7 @@ from app.core.security import ( create_access_token, get_current_user, hash_password, + invalidate_user_cache, verify_password, ) from app.database import get_db @@ -146,5 +147,6 @@ async def verify_email(token: str, db: AsyncSession = Depends(get_db)) -> dict: user.is_verified = True user.verification_token = None await db.commit() + await invalidate_user_cache(user.id) return {"message": "Email успешно подтверждён"}