forked from 0xWheatyz/SPARC
Add rate limiting to /auth/login and /auth/register endpoints #1623
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 are currently unprotected against brute-force attacks and credential stuffing.
What to do
slowapi(orfastapi-limiterbacked by Redis/in-memory) as a dependency.POST /auth/login.POST /auth/register.Retry-Afterheader when the limit is exceeded.requirements.txt.Acceptance criteria
Retry-Afterheader.AUTH_RATE_LIMIT_PER_MINUTE=5).This issue has been resolved by previously merged PRs. The feature is already implemented in the codebase on main.
Closing as already resolved.