diff --git a/src/components/modals/TwoFactorSuccessModal.module.css b/src/components/modals/TwoFactorSuccessModal.module.css index 2804fe91c..aba87fdd5 100644 --- a/src/components/modals/TwoFactorSuccessModal.module.css +++ b/src/components/modals/TwoFactorSuccessModal.module.css @@ -1,5 +1,5 @@ .dialog { - width: 480px; + width: 620px; max-width: 95vw; } diff --git a/src/lib/two-factor/backup-codes.ts b/src/lib/two-factor/backup-codes.ts index a201cf24e..256131d26 100644 --- a/src/lib/two-factor/backup-codes.ts +++ b/src/lib/two-factor/backup-codes.ts @@ -11,9 +11,9 @@ export async function generateBackupCodes(): Promise<{ const plaintext = Array.from( { length: BACKUP_CODE_COUNT }, () => - randomBytes(5).toString('hex').toUpperCase() + + randomBytes(8).toString('hex').toUpperCase() + '-' + - randomBytes(5).toString('hex').toUpperCase(), + randomBytes(8).toString('hex').toUpperCase(), ); const hashed = await Promise.all(plaintext.map(code => bcrypt.hash(code, BCRYPT_ROUNDS))); return { plaintext, hashed };