Skip to content

🔐 Issue: Missing Rate Limiting on Authentication Routes #111

Description

@zaibamachhaliya

📌 Description

The current authentication system does not implement rate limiting on sensitive routes. This makes the application vulnerable to brute-force attacks and can also lead to excessive and unnecessary server load due to repeated requests.

🚨 Routes Affected
POST /register
POST /login
POST /logout

💡 Proposed Solution
Integrate the express-rate-limit middleware into the backend.
Apply stricter rate limits on the login route to prevent brute-force attacks.
Apply moderate rate limits on the register route to avoid spam or abuse.
Ensure proper handling of requests when rate limits are exceeded (return clear and meaningful error messages).
Make rate-limiting values configurable using environment variables for flexibility across environments (development, staging, production).

🎯 Expected Outcome
Improved security against brute-force login attempts.
Reduced risk of abuse through repeated requests.
Better overall server performance and stability.
Stronger protection for all authentication-related endpoints.

Metadata

Metadata

Labels

Mediumweekend project, need some digging!SSoC26bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions