Table of Contents

Sign in with two-factor authentication

Once a user has paired an authenticator app, every sign-in takes two steps on the React Auth UI (MibFrontEnd apps/auth, served under /auth by default):

  1. Password — /auth/login posts the username and password to the Authorization Server (POST /api/v2/auth/login). The server checks the credentials and the login rules; for a user with 2FA on, it answers that a TOTP step is required instead of finishing the sign-in.
  2. Verification code — the app moves to /auth/mfa, where the user types the 6-digit code from their authenticator app (POST /api/v2/auth/totp). A valid code finishes the sign-in: the Authorization Server issues its session and the browser continues the OAuth flow back to the CMS.

A code is valid for its 30-second step and only once — a code already accepted for that step is refused. A wrong, expired or reused code fails the step with the InvalidTotp error code and the app asks again. After a valid code the server evaluates the remaining login rules, so a step such as a password change can still follow.

Other steps of the same login flow use the same mechanism: an expired password, or one that must change at the next sign-in, sends the user to /auth/update-password; Forgot my password is /auth/forgot-password, and the e-mailed link opens /auth/reset-password.

Note

The Authorization Server still contains its legacy server-rendered login (/Login, with its own TOTP page), shown when useNewLoginUI is false. It is deprecated in MIB 7.0 — set useNewLoginUI to true and deploy the React Auth UI, as described in Migrating to the New Login UI.

The sequence diagram of the whole login, including where these steps sit, is in Authentication flows — interactive login.