-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: Implemented forgot password. issue: #144 #151
feat: Implemented forgot password. issue: #144 #151
Conversation
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.
Few questions, rest looks good.
server/controllers/forgotPassword.js
Outdated
} | ||
}); | ||
|
||
const resetUrl = `http://192.168.93.236:5173/reset-password/${token}/${passwd.id}`; |
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.
Is this URL correct? If so, are we redirecting to a different server?
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.
No It wouldn't, Actuallly react provide us two URL for rendering our site - one is localhost and another for over network.
I used 'Network URL ' here because generally multiple gmail accunts signed in the mobile devices, so the reset link which we are sending on user mail will render the reset password page on mobile devices also.
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.
Network URLs are not static :)
They'll change if you switch to a different network. So hard-coding them won't work. IMO keep it localhost because that can be rendered anywhere once the site is deployed and localhost changes to a server address.
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.
I made the changes.
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.
@dvjsharma , merge this PR.
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.
LGTM
Description
This PR introduces a Forgot Password feature to the website, allowing users to reset their passwords by receiving a reset link via email. The main changes include the creation of a
ForgotPassword
component, integration with the backend API, and user feedback through toast notifications and a confirmation message.Changes
ForgotPassword Component:
State Management:
API Integration:
User Feedback:
UI Enhancements:
Before:
After:
How to test
Before testing , add a valid mail credentials in .env file , mail should be with two-factor-auth on.
Issue #144: Implement Forgot Password Feature