Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Adding Rate limiting to the OTP verify #210

Merged
merged 2 commits into from
Oct 26, 2024

Conversation

RishabhRawatt
Copy link
Contributor

Description

Added rate limiting mechanism was implemented for the OTP verification route to prevent brute force attacks.

In-Memory Store:

An in-memory store was added to track the number of OTP verification attempts per user.

Rate Limit Configuration:

The rate limit was set to a maximum of 3 requests per 5-minute window.
Check Rate Limit: A function checkRateLimit was introduced to check and update the request count for each user. If the limit is exceeded, a 429 status code is returned with a message indicating the limit has been reached.
This enhancement addresses issue #208, ensuring that the OTP verification route is protected from excessive requests and potential exploitation.

Screenshots

image

Copy link

vercel bot commented Oct 26, 2024

@RishabhRawatt is attempting to deploy a commit to the ajaynegi45's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🎉 Thank you @RishabhRawatt for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better.

Copy link

vercel bot commented Oct 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
uttarakhand-culture ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 26, 2024 0:46am

Copy link
Owner

@ajaynegi45 ajaynegi45 left a comment

Choose a reason for hiding this comment

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

Hi @RishabhRawatt,

Thank you for your prompt work on this issue. I appreciate your dedication to the project.

I have reviewed your work, and I'm pleased to inform you that I have merged your pull request. Your changes looks fantastic, and it aligns perfectly with the project's design and usability goals. Great job!

If you have any more contributions or if there's anything else you'd like to work on in the future, please don't hesitate to let us know. Your efforts are valuable to the project's success.

Once again, thank you for your contribution! ❤️

@ajaynegi45 ajaynegi45 merged commit 54bfb0d into ajaynegi45:main Oct 26, 2024
2 checks passed
@ajaynegi45 ajaynegi45 added status: ready for dev You can asked for this issue to be assigned (if not already assigned) hacktoberfest hacktoberfest gssoc GirlScript Summer Of Code hacktoberfest-accepted hacktoberfest level3 GirlScript Summer Of Code - 35 points gssoc-ext GirlScript Summer Of Code labels Oct 26, 2024
@ajaynegi45
Copy link
Owner

@RishabhRawatt, now you can work on feature edit profile details or forget password etc.

@RishabhRawatt
Copy link
Contributor Author

Sure I will try to contribute more later ⛰️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc GirlScript Summer Of Code gssoc-ext GirlScript Summer Of Code hacktoberfest hacktoberfest hacktoberfest-accepted hacktoberfest level3 GirlScript Summer Of Code - 35 points status: ready for dev You can asked for this issue to be assigned (if not already assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants