/mfa/backup-codes/generateGenerate 10 backup recovery codes for the user, used for authentication when TOTP is unavailable. Recovery codes are displayed only once; please save them securely. Reference: RFC 6238 (TOTP), OWASP ASVS V2.8.3.
Schema: dto.GenerateBackupCodesRequest
Type: object
| Status | Description | Schema |
|---|---|---|
| 200 | Backup code generation successful | dto.BackupCodesDetailResponse |
| 400 | Invalid parameter | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 401 | Unauthenticated | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 500 | Internal server error | gitee_com_linmes_authms_base_dto.SimpleResponse |
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
data |
dto.BackupCodesResponse |
No | |||
message |
string |
No | |||
timestamp |
string |
No |
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
codes |
array of string |
No | ['["12345678"', '"23456789"]'] |
||
message |
string |
No | Store these backup codes securely |
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |