Change to synchronous password hashing.

This commit is contained in:
Mike Cao 2021-05-23 17:29:27 -07:00
parent 756beb2cf5
commit b2d04c00ac
5 changed files with 12 additions and 12 deletions

View file

@ -39,11 +39,11 @@ export function getRandomChars(n) {
return s;
}
export async function hashPassword(password) {
export function hashPassword(password) {
return bcrypt.hashSync(password, SALT_ROUNDS);
}
export async function checkPassword(password, hash) {
export function checkPassword(password, hash) {
return bcrypt.compareSync(password, hash);
}