Skip to content

fix: add rate limiting to auth routes#774

Open
anmolsah wants to merge 1 commit into
aryandas2911:mainfrom
anmolsah:fix-auth-rate-limiting
Open

fix: add rate limiting to auth routes#774
anmolsah wants to merge 1 commit into
aryandas2911:mainfrom
anmolsah:fix-auth-rate-limiting

Conversation

@anmolsah
Copy link
Copy Markdown

Description

Added rate limiting protection to authentication routes to prevent brute-force attacks and signup spam. Implemented express-rate-limit middleware on /api/auth/login and /api/auth/signup endpoints.

🔗 Related Issue

Closes #33

Changes Made

  • Installed and configured express-rate-limit
  • Added rate limiter middleware for login and signup routes
  • Configured limit to 10 requests per 15 minutes per IP
  • Added proper HTTP 429 response with clear error message
  • Kept normal authentication flow unaffected for valid users

Checklist

  • Code runs locally
  • Followed project structure
  • No console errors
  • Properly tested changes
  • Linked the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Rate Limiting on Auth Routes: Brute-Force Attacks Possible

1 participant