@@ -1,8 +0,0 @@
|
||||
export type JWT = `${string}.${string}.${string}`
|
||||
|
||||
export function create() : JWT {
|
||||
throw "todo"
|
||||
}
|
||||
export function verify() : boolean {
|
||||
throw "todo"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
export function hash(pwd: string) : Promise<string> {
|
||||
return Bun.password.hash(pwd)
|
||||
}
|
||||
|
||||
export async function verify(pwd: string, hash: string) : Promise<boolean> {
|
||||
return Bun.password.verify(pwd, hash).catch(() => false)
|
||||
}
|
||||
Reference in New Issue
Block a user