Magic-link sign in UI and APIs
This commit is contained in:
1 parent
331ed40234
commit
7218947df3
74 files changed
+1582
-363
No files matched your search
@@ -4,10 +4,6 @@ export function sha256Hex(input: string): string {
|
||||
return createHash("sha256").update(input, "utf8").digest("hex");
|
||||
}
|
||||
|
||||
export function hashOtpCode(code: string, pepper: string): string {
|
||||
return sha256Hex(`${pepper}:otp:${code}`);
|
||||
}
|
||||
|
||||
export function hashSessionToken(token: string, pepper: string): string {
|
||||
return sha256Hex(`${pepper}:session:${token}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user