forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #1550
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 authentication endpoints have no protection against brute-force or credential-stuffing attacks. An attacker can make unlimited login attempts without consequence.
Roadmap reference: ROADMAP.md > P1 > Error handling and resilience > No rate limiting on auth endpoints
What to do
slowapifor FastAPI).POST /auth/login(suggested: 10 attempts per minute per IP) andPOST /auth/register(suggested: 5 per minute per IP).429 Too Many Requestswith aRetry-Afterheader when the limit is exceeded.LOGIN_RATE_LIMIT,REGISTER_RATE_LIMIT).Acceptance criteria
429.This issue has been resolved. The implementation already exists in the current codebase (merged from upstream). Verified by repo manager during triage on 2026-04-19.