MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / hashRecoveryCodes

Function hashRecoveryCodes

packages/auth/src/totp.ts:77–79  ·  view source on GitHub ↗
(codes: string[])

Source from the content-addressed store, hash-verified

75}
76
77export async function hashRecoveryCodes(codes: string[]): Promise<string[]> {
78 return Promise.all(codes.map((code) => hashPassword(normalizeRecoveryCode(code))));
79}
80
81export function normalizeRecoveryCode(input: string): string {
82 return input.trim().toUpperCase().replace(/\s+/g, '');

Callers 1

auth.tsFile · 0.90

Calls 3

hashPasswordFunction · 0.90
normalizeRecoveryCodeFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected