mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
Add two factor authentication for users who wish to enhance the security of their accounts.
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import { compareSync as bcryptCompareSync, hashSync as bcryptHashSync } from 'bcrypt';
|
|
|
|
import { SALT_ROUNDS } from '../../constants/auth';
|
|
|
|
/**
|
|
* @deprecated Use the methods built into `bcrypt` instead
|
|
*/
|
|
export const hashSync = (password: string) => {
|
|
return bcryptHashSync(password, SALT_ROUNDS);
|
|
};
|
|
|
|
export const compareSync = (password: string, hash: string) => {
|
|
return bcryptCompareSync(password, hash);
|
|
};
|