allow backup code input for totp

This commit is contained in:
Milo Schwartz
2024-12-22 17:20:24 -05:00
parent 11cbafb92a
commit 4b34353354
4 changed files with 10 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ export async function verifyTotp(
async function generateBackupCodes(): Promise<string[]> {
const codes = [];
for (let i = 0; i < 10; i++) {
const code = generateRandomString(8, alphabet("0-9", "A-Z", "a-z"));
const code = generateRandomString(6, alphabet("0-9", "A-Z", "a-z"));
codes.push(code);
}
return codes;