-
Notifications
You must be signed in to change notification settings - Fork 214
feat: password reset email #471
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
Conversation
…d-email I added the endpoint for users to request for password reset and a link will be sent to the user if the user provides an email that is in the database
…created the file and I did not modify it
…d-email I just made some changes to my pytest
…d-email I just finished fixing my pytest, I pray it works.
I've been deactivated from the slack channel though! |
|
||
# Protected route example: test route | ||
@auth.get("/admin") | ||
def read_admin_data(current_admin: Annotated[User, Depends(user_service.get_current_super_admin)]): | ||
return {"message": "Hello, admin!"} | ||
|
||
def generate_access_token(data: dict, expires_delta: Optional[timedelta] = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here, all of this needs to be in user service.
Generate access token has been taken care of
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once it's put there, it does not work again for some reasons I can't explain, so I had to leave the functions in the auth file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this .idea from here
Don't check it ingo github
Closing this PR because this endpoint has been implemented and merged |
The endpoint allows users to reset their password by providing the password they used in registration.
Description
The endpoint takes the email the user provided and compare it again the record in the database if it matches any email, if it does, it sends a password reset link into the user's email and returns 200 OK status code. If the email does not exist in the database, it returns "We don't have user with the provided email in our database." and 404 status code.
Related Issue (Link to issue ticket)
#51
Motivation and Context
This will allow users to retrieve their email should in case anything happen to their account provided thy know the email address.
How Has This Been Tested?
Yes, I tested it using pytest and Postman.
Screenshots (if appropriate - Postman, etc):





Types of changes
Checklist: