Fix login issue
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user