From 5b1b36a55316699eaebdf8466c016d642d844287 Mon Sep 17 00:00:00 2001 From: SowinskiBraeden Date: Mon, 5 May 2025 18:12:19 -0700 Subject: [PATCH] fix/compare password on sign in --- src/auth/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/authentication.js b/src/auth/authentication.js index 410a154..280558d 100644 --- a/src/auth/authentication.js +++ b/src/auth/authentication.js @@ -33,7 +33,7 @@ module.exports = (users) => { return res.redirect("/login"); } - if (!bcrypt.compare(req.body.password, user.password)) { + if (!bcrypt.compareSync(req.body.password, user.password)) { req.session.errMessage = "Incorrect password"; res.status(status.Unauthorized); return res.redirect("/login");