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

Function generateRecoveryCodes

packages/auth/src/totp.ts:73–75  ·  view source on GitHub ↗
(count = 10)

Source from the content-addressed store, hash-verified

71}
72
73export function generateRecoveryCodes(count = 10): string[] {
74 return Array.from({ length: count }, randomRecoveryCode);
75}
76
77export async function hashRecoveryCodes(codes: string[]): Promise<string[]> {
78 return Promise.all(codes.map((code) => hashPassword(normalizeRecoveryCode(code))));

Callers 1

auth.tsFile · 0.90

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected