-
Notifications
You must be signed in to change notification settings - Fork 134
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
Bugfix: implement rate limiting for auth endpoints #942
Merged
johnson-oragui
merged 20 commits into
hngprojects:dev
from
MikeSoft007:bugfix/waitlist_email
Aug 23, 2024
Merged
Bugfix: implement rate limiting for auth endpoints #942
johnson-oragui
merged 20 commits into
hngprojects:dev
from
MikeSoft007:bugfix/waitlist_email
Aug 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ome waitlist html
add slowapi to requirements.txt, then update the branch |
MikeSoft007
force-pushed
the
bugfix/waitlist_email
branch
from
August 23, 2024 18:50
9a3dc47
to
4a55c85
Compare
MikeSoft007
changed the title
Bugfix: send confirmation email after waitlist signup
Bugfix: send confirmation email after waitlist signup and added rate limit to authentication routes
Aug 23, 2024
MikeSoft007
changed the title
Bugfix: send confirmation email after waitlist signup and added rate limit to authentication routes
Bugfix: implement rate limiting for auth endpoints
Aug 23, 2024
johnson-oragui
approved these changes
Aug 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces rate limiting to selected API endpoints in our application. The goal is to prevent abuse and ensure fair usage by restricting the number of requests a client can make within a given time frame.
Rate Limiting Implementation:
-- /api/v1/auth/magic-link: Limited to 5 requests per minute per user.
-- /api/v1/auth/login: Limited to 10 requests per minute per user.
-- /api/v1/resource/*: General rate limiting applied across all resource-related endpoints.
Configuration:
Related Issue (Link to issue ticket)
hngprojects/hng_boilerplate_nestjs#911
Motivation and Context
This change is required to ensure that the backend can handle request loads more effectively and prevent abuse, especially in high-traffic scenarios. Implementing rate limiting helps to maintain service availability and improves the overall user experience by ensuring that the API remains responsive and fair to all users.
This change is required to ensure that the backend can send emails that are more aligned with the requirements of the endpoints.
How Has This Been Tested?
The change was tested using integration tests in a development environment. The tests included:
Screenshots (if appropriate - Postman, etc):
Types of changes
Checklist: