Fix login issue

This commit is contained in:
Urtzi Alfaro
2025-07-20 21:29:58 +02:00
parent a6c3647180
commit daab1b77e1
4 changed files with 6 additions and 42 deletions

View File

@@ -104,13 +104,7 @@ async def login(
try:
# Check login attempts
if not await SecurityManager.check_login_attempts(login_data.email):
if metrics:
metrics.increment_counter("login_failure_total", labels={"reason": "rate_limited"})
raise HTTPException(
status_code=status.HTTP_429_TOO_MANY_REQUESTS,
detail="Too many login attempts. Please try again later."
)
# Attempt login
result = await AuthService.login(login_data.email, login_data.password, db)