refactor: use hash directly in authmek and version field on authmek

This commit is contained in:
DecDuck
2025-03-24 12:50:21 +11:00
parent cb4937b590
commit 1996b97e99
5 changed files with 30 additions and 45 deletions

View File

@ -2,13 +2,6 @@ import bcrypt from "bcryptjs";
import * as argon2 from "argon2";
import { type } from "arktype";
export const simpleAuth = type({
version: "string.semver",
password: "string",
});
export type SimpleAuthType = typeof simpleAuth.infer;
export async function checkHashBcrypt(password: string, hash: string) {
return await bcrypt.compare(password, hash);
}