Docs
Live demo

Submit the second factor of a Principal password sign-in

POST/api/v2/auth/dex/principal/login/mfa

Checks the authenticator or recovery code of the pending password sign-in with the attempt budget and lockout of the console challenge, then redirects to the Dex callback with a one-time code. When the organization requires a second factor the account does not have, method totp_setup confirms the authenticator app shown on the page and answers with the recovery codes and the link to the Dex callback.

Request body application/x-www-form-urlencoded

Required3 of 4 fields
methodstringrequired
totprecovery_codetotp_setup
codestring · passwordrequired
attemptstringrequired

Marker of the sign-in the form was rendered for.

Optional1 field
enrollmentstring · uuid

Authenticator app the setup form shows. Only with method totp_setup.

Responses

200

The second factor was set up: the page shows the recovery codes once and the link to the Dex callback with a one-time code, or asks to sign in again when the sign-in failed after the setup.

text/html

302

Redirect to Dex callback with code.

400

The code is empty or the request is invalid.

text/html

401

The code was not accepted (the form shows the attempts left), or the pending sign-in is missing, expired or out of attempts.

text/html

403

Access to the application or password sign-in was turned off during the sign-in.

text/html

409

The form belongs to a sign-in that a newer one in another tab replaced. No factor is checked, and the newer sign-in keeps its cookie and attempts.

text/html

429

Second-factor checks of the account are locked after repeated failures (the page names the retry time), verification is busy, or the request rate is exceeded (request.rate_limited).

text/html

500

Internal Server Error. After the factor was checked the page asks the user to sign in again (text/html).

text/html

503

Service Unavailable

Common errors: 413 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close