chore: minor lint fixes (#934)

This commit is contained in:
Lucas Smith
2024-02-16 21:48:45 +11:00
committed by GitHub
5 changed files with 91 additions and 82 deletions

View File

@ -43,7 +43,7 @@ export const setupTwoFactorAuthentication = async ({
const secret = crypto.randomBytes(10);
const backupCodes = new Array(10)
const backupCodes = Array.from({ length: 10 })
.fill(null)
.map(() => crypto.randomBytes(5).toString('hex'))
.map((code) => `${code.slice(0, 5)}-${code.slice(5)}`.toUpperCase());