feat: add credentials authentication (#1)
This commit is contained in:
9
packages/auth/security.ts
Normal file
9
packages/auth/security.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import bcrypt from "bcrypt";
|
||||
|
||||
export const createSalt = async () => {
|
||||
return bcrypt.genSalt(10);
|
||||
};
|
||||
|
||||
export const hashPassword = async (password: string, salt: string) => {
|
||||
return bcrypt.hash(password, salt);
|
||||
};
|
||||
Reference in New Issue
Block a user