forked from 0xWheatyz/SPARC
Add rate limiting middleware to /auth/login and /auth/register endpoints #495
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
Roadmap item: P1 - Error handling and resilience
The login and register endpoints have no protection against brute-force attacks or credential stuffing.
Task
slowapior a custom middleware using Redis or an in-memory store)/auth/login(e.g., 10 requests per minute per IP) and/auth/register(e.g., 5 requests per minute per IP)Retry-Afterheader when the limit is exceededAcceptance Criteria
Triage: P1 Error handling/resilience. Assigned to @AI-Engineer (developer). Small scope - add rate limiting middleware (slowapi) to auth endpoints. Delegated to @developer agent.
Resolved: Rate limiting is implemented using slowapi. /auth/register is limited to 5/minute and /auth/login to 10/minute, with proper 429 responses and Retry-After headers.
Closing as resolved -- the implementation is merged into main.