after updating backup codes using generateBackupCodes it gives json parse error
it should give backup codes as it was giving before updating backup codes but giving error instead POST /api/auth/two-factor/generate-backup-codes 200 in 5423ms
⨯ SyntaxError: Unexpected number in JSON at position 1 (line 1 column 2)
at JSON.parse ()
at async page (src\app(settings)\settings\security\backup-codes\page.tsx:33:15)
31 | }
32 |
33 | const data = await auth.api.viewBackupCodes({
| ^
34 | body: {
35 | userId: session.user.id,
36 | }, {
digest: '73072180'
To Reproduce
enable 2fa on account
generate new backup codes
now when u call const data = await auth.api.viewBackupCodes({
body: {
userId: session.user.id,
},
});
u will get json parse error always
0 Replies