fix: additional fix for auth login flow and auth web pages and database
connection.
This commit is contained in:
@@ -8,8 +8,8 @@ const saltRounds = 12;
|
||||
* @param {string} password - Password da hashare
|
||||
* @returns {string} - Hash della password
|
||||
*/
|
||||
function hashPassword(password) {
|
||||
return bcrypt.hashSync(password, saltRounds);
|
||||
async function hashPassword(password) {
|
||||
return bcrypt.hash(password, saltRounds);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -18,8 +18,8 @@ function hashPassword(password) {
|
||||
* @param {string} hash - Hash della password
|
||||
* @returns {boolean} - True se la password è corretta, false altrimenti
|
||||
*/
|
||||
function verifyPassword(password, hash) {
|
||||
return bcrypt.compareSync(password, hash);
|
||||
async function verifyPassword(password, hash) {
|
||||
return bcrypt.compare(password, hash);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user