Express' Bcrypt, Passport, and Session using SQLite3's UPDATE Question #978
Unanswered
PebblesFaith
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear fellow developers,
I am facing an issue with updating the password fields in my web application's SQLite3 database using express, bcrypt, passport, and session. Despite exhausting all my thought process and trying different approaches, I have not been able to successfully update the password fields for a user with a new password and confirm password. The authentication process works fine, but the update operation does not.
Here is the relevant code from my Express route:
app.post('/login2', async(req, res) => {
const email = req.body.email;
const temporary_Password = req.body.temporary_Password;
const newPassword = req.body.password;
const newConfirmPassword = req.body.confirmPassword;
});
I have used bcrypt to hash the passwords and compare them with the temporary password in the database. I have also checked if the email exists and if the new password and confirm password match. However, despite no errors or exceptions, the password fields in the database are not getting updated.
I have noticed that mongoose, a popular Node.js library for MongoDB, has a parameter that can assist in the update process, but SQLite3 does not seem to have a similar functionality.
I would greatly appreciate if any of you fellow developers have any insights or answers to why this update operation is not working as expected. I have been stuck on this issue for quite some time now, and any help or suggestions would be highly appreciated.
Thank you in advance for your assistance.
Best,
Sarai Hannah Ajai
Beta Was this translation helpful? Give feedback.
All reactions