mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-01 03:11:44 -06:00
* format code * fix building issue in database package * update turbo config and package jsons * update error package with more information and license * fix typescript issues in ui package * update package-lock * update packages * clean dependencies in web * clean up dependencies in demo & formbricks-com * remove unsused template file * remove legacy capture endpoint * remove unfinished client endpoints * clean up unused functions * fix formbricks not loading on invalid session * update readme
12 lines
337 B
TypeScript
12 lines
337 B
TypeScript
import { compare, hash } from "bcryptjs";
|
|
|
|
export async function hashPassword(password: string) {
|
|
const hashedPassword = await hash(password, 12);
|
|
return hashedPassword;
|
|
}
|
|
|
|
export async function verifyPassword(password: string, hashedPassword: string) {
|
|
const isValid = await compare(password, hashedPassword);
|
|
return isValid;
|
|
}
|