Confirm 2FA setup
POST
/login/2fa/setup/confirm
const url = 'https://auth.timetonic.com/login/2fa/setup/confirm';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"setup_token":"example","code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://auth.timetonic.com/login/2fa/setup/confirm \ --header 'Content-Type: application/json' \ --data '{ "setup_token": "example", "code": "example" }'Confirm enforced TOTP setup before login completes.
Request Bodyrequired
Section intitulée « Request Bodyrequired »Media typeapplication/json
object
setup_token
required
string
code
required
string
Examplegenerated
{ "setup_token": "example", "code": "example"}Responses
Section intitulée « Responses »2FA setup confirmed and login completed
Media typeapplication/json
object
success
boolean
jwt
JWT access token
string
refresh_token
Refresh token
string
user
object
id
string format: uuid
email
string format: email
redirect
Redirect URL with token appended
string format: uri
form_post
HTML form body returned when OIDC response_mode is form_post
string
passThroughParameters
Parameters stored from initial bootstrap
object
key
additional properties
string
mustChangePassword
Whether user must change password
boolean
passwordResetToken
Token for password change (if mustChangePassword is true)
string
authenticationPolicies
Password policies for change form
object
twoFactorSetupRequired
Whether 2FA setup is enforced by policy
boolean
twoFactorData
2FA setup data if setup is required
object
secret
string
qr_uri
string
Example
{ "success": true}Setup token expired, OIDC request expired, or invalid verification code
Media typeapplication/json
object
success
boolean
error
string
message
string
Example
{ "success": false}Setup token points to a user that no longer exists
Media typeapplication/json
object
success
boolean
error
string
message
string
Example
{ "success": false}Validation error
Media typeapplication/json
object
success
boolean
error
string
message
string
errors
object
key
additional properties
Array<string>
Example
{ "success": false, "error": "validation_error", "message": "The given data was invalid", "errors": { "email": [ "The email field is required." ] }}