Change to synchronous password hashing.
This commit is contained in:
1 parent
756beb2cf5
commit
b2d04c00ac
5 files changed
+12
-12
No files matched your search
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user