Files

9 lines
270 B
TypeScript

import bcrypt from "bcryptjs";
export { SESSION_COOKIE, createSession, verifySession } from "./session";
export async function verifyPassword(plain: string, hash: string): Promise<boolean> {
if (!plain || !hash) return false;
return bcrypt.compare(plain, hash);
}