Skip to content

feat: add rate limiting to authentication routes - #78

Merged
swarooppatilx merged 1 commit into
swarooppatilx:mainfrom
100NikhilBro:feature/rate-limiter-auth
Sep 18, 2025
Merged

swarooppatilx merged 1 commit into
swarooppatilx:mainfrom
100NikhilBro:feature/rate-limiter-auth

Conversation

@100NikhilBro

Copy link
Copy Markdown
Contributor

🚀 Issue Number: #73 - Implement Rate Limiting

✅ Implemented using rate-limiter-flexible:

  • 🔑 Auth Routes: IP-based limiter
  • 🌐 API Routes: Guest + Logged-in user (IP + User ID) limiter

📂 Folder Structure

  • middleware/
    • rateLimiting/
      • authLimiter.js
      • apiLimiter.js
      • index.js

💡 Note: In some cases, apiRateLimiter is applied directly inside route files because user ID is needed for logged-in users.

✨ Summary

  • Securely limits requests for both guests and logged-in users.
  • Auth routes have stricter limits to prevent brute-force attacks.
  • Folder structure organized for clarity and modularity.

@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@100NikhilBro

Copy link
Copy Markdown
Contributor Author

Hi @swarooppatilx,
I’ve created a pull request. Please review it, and if everything looks good, you can go ahead and merge it.

@100NikhilBro

Copy link
Copy Markdown
Contributor Author

Hi @swarooppatilx ,
Please review the pull request and merge it as soon as possible related to issue #73 . Thanks!

@swarooppatilx swarooppatilx left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@swarooppatilx swarooppatilx added gssoc25 GirlScript Summer of Code 2025 level2 GSSoC 2025 Level 2 labels Sep 18, 2025
@swarooppatilx
swarooppatilx merged commit d64af74 into swarooppatilx:main Sep 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc25 GirlScript Summer of Code 2025 level2 GSSoC 2025 Level 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants