Initialize 2FA setup
POST/v1/auth/2fa/setup
Generates a new TOTP secret and QR code for setting up two-factor authentication. Returns the secret, QR code, and backup codes. The user must verify with a code from their authenticator app before 2FA is enabled.
Request
Responses
- 200
- 400
- 401
- 409
- 500
2FA setup initiated successfully
bad_request: Invalid input
unauthorized: Unauthorized
2FA already enabled
Internal server error