forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #310
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 authentication endpoints have no protection against brute-force login attempts or registration spam. A bot can attempt unlimited password guesses or create accounts without restriction.
Work Required
api.pyorauth.pyslowapi(a FastAPI-compatible wrapper aroundlimits) or similar/auth/loginand/auth/registerRetry-Afterheader when the limit is exceededrequirements.txtAcceptance Criteria
/auth/loginwithin 60 seconds from the same IP returns HTTP 429 on the 11th requestX-RateLimit-*orRetry-After) are present in 429 responsesThis issue has already been resolved in the fork's main branch. Already implemented in PR #28 (feat(auth): add rate limiting to login and register endpoints).
Closing as completed.