Skip to content

feat(auth): implement rate limiting for authentication endpoints#872

Merged
Junirezz merged 1 commit into
Junirezz:mainfrom
Devsol-01:main
Jun 29, 2026
Merged

feat(auth): implement rate limiting for authentication endpoints#872
Junirezz merged 1 commit into
Junirezz:mainfrom
Devsol-01:main

Conversation

@Devsol-01

Copy link
Copy Markdown
Contributor

feat(auth): implement rate limiting for authentication endpoints

Description

This PR introduces rate limiting for the authentication endpoints to improve security and protect against brute-force and denial-of-service attacks.

What's Changed

  • Added rate limiting to the login endpoint.
  • Added rate limiting to the signup endpoint.
  • Implemented exponential backoff after repeated failed attempts.
  • Integrated Redis for distributed rate limit storage.
  • Configured separate limits for login and signup requests.
  • Added middleware to handle rate limit responses consistently.

Why

Authentication endpoints are common targets for brute-force attacks. This implementation helps mitigate abuse while maintaining a good user experience for legitimate users.

Testing

  • Verified login rate limiting after the configured number of failed attempts.
  • Verified signup rate limiting.
  • Confirmed lockout duration is enforced correctly.
  • Tested successful requests after the lockout period expires.

Checklist

  • Code follows project standards
  • Tested locally
  • No breaking changes introduced
  • Documentation updated (if applicable)

closes #801
closes #802
closes #803
closes #804

@Junirezz Junirezz merged commit effd967 into Junirezz:main Jun 29, 2026
14 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants