Confirm authenticator enrollment
POST
/v1/auth/totp/confirm
const url = 'http://localhost:8080/v1/auth/totp/confirm';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"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 http://localhost:8080/v1/auth/totp/confirm \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Proves possession with a first code from the app. From here, password sign-in requires an authenticator code whenever auth.login_totp_enabled is on. 401 for a wrong code, 409 when nothing is enrolled; confirming twice is a no-op.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”No Content