AuthenticationTwo-factor authentication
Generate backup codes
POST
Generate new backup codes for two-factor authentication
sessioncookie
gamma.session_token<token>The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.
application/json- body
password?stringThe users password.
Backup codes generated successfully
application/json- response
status*trueIndicates if the backup codes were generated successfully
Value in
truebackupCodes*array<string>Array of generated backup codes in plain text
Example Request
curl -X POST 'http://localhost:3000/api/auth/two-factor/generate-backup-codes' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "status": true, "backupCodes": [ "string" ]}