router/api-router.go:139。controller.Setup2FA,controller/twofa.go:22。account_security:write。同时需要满足接口的角色和业务要求。Authorization: Bearer ********************curl --location --request POST '/api/user/2fa/setup' \
--header 'X-Security-Proof;' \
--header 'Authorization: Bearer <token>'{
"success": true,
"message": "string",
"data": {
"secret": "string",
"qr_code_data": "string",
"backup_codes": [
"string"
],
"flow_token": "string",
"expires_at": 0,
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}