Skip to content

Add auth endpoint rate limiting#1978

Open
Jorel97 wants to merge 1 commit into
SecureBananaLabs:mainfrom
Jorel97:codex/auth-rate-limit-743
Open

Add auth endpoint rate limiting#1978
Jorel97 wants to merge 1 commit into
SecureBananaLabs:mainfrom
Jorel97:codex/auth-rate-limit-743

Conversation

@Jorel97
Copy link
Copy Markdown

@Jorel97 Jorel97 commented May 30, 2026

/claim #743

Closes #1977

Summary

  • Added a dedicated authLimiter for credential-sensitive auth endpoints.
  • Applied the stricter limiter to POST /api/auth/register, POST /api/auth/login, and POST /api/auth/refresh while leaving non-auth routes on the existing general API limiter.
  • Updated the API test script to use an explicit src/tests/*.test.js glob so the Node test runner executes the test files reliably.
  • Added regression coverage proving the 11th login attempt is blocked with HTTP 429 and a structured JSON error.

Demo

Short demo video: https://github.com/Jorel97/bounty-demo-assets/raw/main/securebanana/securebanana-1977-auth-rate-limit-demo.mp4

Validation

  • npm test
    • 3 tests passed
    • includes authRateLimit.test.js for the strict auth limiter behavior
  • git diff --check

github-actions Bot added a commit that referenced this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auth endpoints need stricter rate limiting

1 participant