forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #136
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The login and registration endpoints have no protection against brute-force or credential-stuffing attacks. Adding rate limiting is a standard hardening step before production exposure.
Work
slowapifor FastAPI) into the app./auth/loginand/auth/register.Retry-Afterheader when the limit is exceeded.Acceptance Criteria
/auth/loginreturns HTTP 429.Retry-Afterheader is present in 429 responses.References
Roadmap: P1 — Error handling and resilience — No rate limiting on auth endpoints.
Closing: Rate limiting via slowapi is applied to /auth/login (10/min) and /auth/register (5/min). Resolved.