Confirm MFA enrollment during an enforced sign-in
POST
/_torii/auth/mfa/enroll/confirm
const url = 'https://your-app.toriiauth.eu/_torii/auth/mfa/enroll/confirm?_is_native=false';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"challengeToken":"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://your-app.toriiauth.eu/_torii/auth/mfa/enroll/confirm?_is_native=false' \ --header 'Content-Type: application/json' \ --data '{ "challengeToken": "example", "code": "example" }'Confirms the first code for an enrollment started by /mfa/enroll: activates the factor, signs the user in, and returns single-use recovery codes (shown once).
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Origin
string
Host
string
Query Parameters
Section titled “Query Parameters”_is_native
boolean
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
challengeToken
required
string
code
required
string
Examplegenerated
{ "challengeToken": "example", "code": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
Examplegenerated
{}