-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix: Resolve login failure issue due to password comparison #319
base: main
Are you sure you want to change the base?
Fix: Resolve login failure issue due to password comparison #319
Conversation
The issue was caused by the way the server was returning the data, which was not being handled correctly on the client-side. The updated `handleLogin` function now includes an additional check to ensure the plaintext password from the form matches the hashed password stored in the database using `bcrypt.compare`. This resolves the "Invalid credentials" error that users were experiencing during login.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for mmmutmcanetwork ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
🎉 Thank you 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
❌ Deploy Preview for mmmut-mca failed.
|
@abhishekraoas Why my pull request got failed bro! |
It's an issue during vercel deployment. |
Still not working. can you share the video of login steps |
@abhishekraoas Despite my attempts to resolve the issue, I have not been able to fully fix the problem yet. I apologize for not being able to resolve this, Thank you for your understanding. |
Can you fix it or not ? |
I can't, apologise for it! |
Description
This pull request addresses the issue where users were unable to log in due to a password comparison failure in the
handleUserLogin
controller.The issue was caused by the way the server was returning the data, which was not being handled correctly on the client-side. The updated
handleLogin
function now includes an additional check to ensure the plaintext password from the form matches the hashed password stored in the database usingbcrypt.compare
. This resolves the "Invalid credentials" error that users were experiencing during login.Changes
handleLogin
function to usebcrypt.compare
to directly compare the plaintext password from the form with the hashed password stored in the database.catch
block to help with debugging any future issues.Fixes
Resolves #315 - Login failure due to password comparison issue