Skip to content

Commit ada6573

Browse files
committed
docs(mfa): fix MFA statements that contradict code
Align MFA, Account API, audit log, and organization docs with current released behavior in logto-io/logto (LOG-14771).
1 parent f9ced7d commit ada6573

9 files changed

Lines changed: 43 additions & 36 deletions

File tree

‎docs/developers/audit-logs/event-types.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ Feel free to [contact us](https://logto.io/contact) if you’d like to share you
127127
| Interaction.Register.Verification.BackupCode.Submit | Verify backup code |
128128
| Interaction.Register.Verification.Totp.Create | Create TOTP verification secret for MFA binding |
129129
| Interaction.Register.Verification.Totp.Submit | Verify TOTP verification code |
130-
| Interaction.Register.Verification.Webauthn.Create | Create WebAuthn authentication |
130+
| Interaction.Register.Verification.WebAuthn.Create | Create WebAuthn authentication |
131131
| Interaction.Register.Verification.WebAuthn.Submit | Verify WebAuthn authentication |
132132
| Interaction.SignIn.Verification.BackupCode.Create | Create backup codes for MFA binding |
133133
| Interaction.SignIn.Verification.BackupCode.Submit | Verify backup code |
134134
| Interaction.SignIn.Verification.Totp.Create | Create TOTP verification secret for MFA binding |
135135
| Interaction.SignIn.Verification.Totp.Submit | Verify TOTP verification code |
136-
| Interaction.SignIn.Verification.Webauthn.Create | Create WebAuthn authentication |
136+
| Interaction.SignIn.Verification.WebAuthn.Create | Create WebAuthn authentication |
137137
| Interaction.SignIn.Verification.WebAuthn.Submit | Verify WebAuthn authentication |
138138
| TrustedDevice.Created | Create a trusted-device credential |
139139
| TrustedDevice.Used | Use a trusted device to fulfill sign-in MFA |

‎docs/end-user-flows/account-settings/by-account-api.mdx‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ curl -X POST https://[tenant-id].logto.app/api/my-account/mfa-verifications \
378378
--data-raw '{"type":"WebAuthn","newIdentifierVerificationRecordId":"..."}'
379379
```
380380

381-
- `type`: the type of the MFA factor, currently only `WebAuthn` is supported.
382-
- `newIdentifierVerificationRecordId`: the verification record ID returned by the server in step 1.
381+
- `type`: the type of the MFA factor (`WebAuthn`, `Totp`, or `BackupCode`; use `WebAuthn` here).
382+
- `newIdentifierVerificationRecordId`: the verification record ID returned by the server in step 2.
383383

384384
### Manage existing WebAuthn passkeys \{#manage-existing-webauthn-passkeys}
385385

@@ -400,15 +400,18 @@ The response body would be like:
400400
"name": "...",
401401
"agent": "...",
402402
"createdAt": "...",
403-
"updatedAt": "..."
403+
"lastUsedAt": "..."
404404
}
405405
]
406406
```
407407

408408
- `id`: the ID of the verification.
409-
- `type`: the type of the verification, `WebAuthn` for WebAuthn passkey.
410-
- `name`: the name of the passkey, optional field.
411-
- `agent`: the user agent of the passkey.
409+
- `type`: the type of the verification (`WebAuthn`, `Totp`, or `BackupCode`).
410+
- `name`: the name of the passkey, optional field (for `WebAuthn`).
411+
- `agent`: the user agent of the passkey (for `WebAuthn`).
412+
- `createdAt`: the timestamp when the verification was created.
413+
- `lastUsedAt`: the timestamp when the verification was last used, optional field (for `WebAuthn`).
414+
- `remainCodes`: the number of remaining unused backup codes, optional field (for `BackupCode`).
412415

413416
Update the passkey name using [`PATCH /api/my-account/mfa-verifications/{verificationId}/name`](https://openapi.logto.io/operation/operation-updatemfaverificationname) endpoint:
414417

@@ -641,7 +644,7 @@ curl -X PATCH https://[tenant-id].logto.app/api/my-account/mfa-settings \
641644
- `skipMfaOnSignIn`: set to `true` to disable 2-step verification for the user, or `false` to enable it.
642645

643646
:::note
644-
This setting only takes effect when the MFA policy is set to **Optional**. If MFA is **Mandatory** or **Adaptive**, the `skipMfaOnSignIn` setting will be ignored and MFA will be enforced.
647+
This setting only takes effect when the MFA policy is set to **Optional** and MFA is not required for the user or their organizations (via `organizationRequiredMfaPolicy`). If MFA is **Mandatory**, or required for the user or organization, `skipMfaOnSignIn` is ignored and MFA is enforced. Under **Adaptive MFA**, `skipMfaOnSignIn` is also ignored, and MFA verification is prompted only when a risk rule triggers.
645648
:::
646649

647650
### Manage user sessions \{#manage-user-sessions}

‎docs/end-user-flows/mfa/README.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Authentication factors are the measures that verify your identity. There are var
2121
| Possession | Something you have | SMS verification code, Authenticator app OTP, Hardware OTP (Security key) |
2222
| Inherence | Something you are | Biometrics like fingerprints, face ID |
2323

24-
In an MFA flow, the second authentication step must employ a different attribute type (Knowledge/Possession/Inherence) than the first. For example, using "Password (Knowledge)" as the first factor and "Authenticator app OTP (Possession)" as the second factor can effectively mitigate various attack vectors.
24+
In an MFA flow, using a second factor from a different attribute category (Knowledge / Possession / Inherence) than the first strengthens security against single-channel compromise. Note that Logto does not enforce distinct attribute categories across 1FA and 2FA; it only forbids using the same email or SMS verification code method as both a sign-in method (1FA) and an MFA factor (2FA).
2525

2626
## Why do we need an MFA? \{#why-do-we-need-an-mfa}
2727

‎docs/end-user-flows/mfa/authenticator-app-otp.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For detailed implementation steps and API endpoints, see [Account settings by Ac
2727

2828
1. **QR Code or Secret Key**: Users receive a QR code or a secret key from your service.
2929
2. **Add account**: Using their authenticator app, users scan the QR code or manually enter the secret key to add their account.
30-
3. **Dynamic one-time password**: The authenticator app displays a six-digit code that refreshes every 1-2 minutes for the added account.
30+
3. **Dynamic one-time password**: The authenticator app displays a six-digit code that refreshes every 30 seconds for the added account.
3131
4. **Complete MFA setup**: Users enter this code within its validity into the MFA setup page, completing the setup of Authenticator App OTP for MFA.
3232

3333
<img src="/img/assets/otp-set-up-flow.png" alt="OTP set up flow" />

‎docs/end-user-flows/mfa/configure-mfa.mdx‎

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ Follow these steps to enable MFAs in users' Logto sign-in flow:
2525
- **Optional MFA**: Let users decide whether to enable MFA for their own account security. Users can skip MFA setup during sign-in and set it up later through your self-service account settings page. [Learn more](/end-user-flows/account-settings/) about implementing a user account settings page.
2626
- **Adaptive MFA**: Apply MFA only when a sign-in appears unusual, so low-risk sign-ins can stay smoother while suspicious sign-ins get extra verification. To make that decision, Logto evaluates high-level contextual signals such as the user's inactivity level, whether the current sign-in context is broadly consistent with recent travel-related sign-in patterns, the state of the network connection, and other session or environmental indicators. This mode depends on your existing MFA setup (at least one MFA factor must be enabled), applies to end-user sign-in flows, and does not rely on device fingerprinting or precise location tracking.
2727
- **Mandatory MFA**: Require all users to complete MFA on every sign-in. Users who have not set up MFA must complete setup before they can continue.
28-
- When **Optional MFA** or **Adaptive MFA** is selected, configure the MFA setup prompt policy:
29-
- **Do not ask users to set up MFA**: Users will not be prompted to set up MFA during sign-in.
30-
- **Ask users to set up MFA during registration**: New users will be prompted to set up MFA during registration, and existing users will see the prompt at their next sign-in. Under **Optional MFA**, users can skip this step and it won't appear again. Under **Adaptive MFA**, once prompted, users must complete MFA setup before finishing the current sign-in or sign-up flow.
31-
- **Ask users to set up MFA on their sign-in after registration**: New users will be prompted to set up MFA at their second sign-in after registration, and existing users will see the prompt at their next sign-in. Under **Optional MFA**, users can skip this step and it won't appear again. Under **Adaptive MFA**, once prompted, users must complete MFA setup before finishing the current sign-in or sign-up flow.
28+
- When **Optional MFA** is selected, configure the MFA setup prompt policy:
29+
- **Do not ask users to set up MFA**: Users will not be prompted to set up MFA during sign-in or registration.
30+
- **Ask users to set up MFA during registration**: New users will be prompted to set up MFA during registration, and existing users will see the prompt at their next sign-in. Users can skip this step and it won't appear again.
31+
- **Ask users to set up MFA on their sign-in after registration**: New users will be prompted to set up MFA at their next sign-in after registration, and existing users will see the prompt at their next sign-in. Users can skip this step and it won't appear again.
32+
- When **Adaptive MFA** is selected, only the two non-skippable setup prompt policies are supported (**Do not ask users to set up MFA** is not available):
33+
- **Ask users to set up MFA during registration (non-skippable)**: New users must complete MFA setup during registration, and existing users without MFA must complete it at their next sign-in.
34+
- **Ask users to set up MFA on their next sign-in attempt after registration (non-skippable)**: New users must complete MFA setup at their next sign-in after registration, and existing users without MFA must complete it at their next sign-in.
3235

33-
When **Optional MFA** or **Adaptive MFA** is selected and Logto decides to prompt the user to enroll, the flow first shows an enable-MFA confirmation page titled `Turn on 2-step verification`. Under **Optional MFA**, users can choose `Enable 2-step verification` to continue to MFA binding, or skip the prompt and finish the current sign-in / sign-up flow without turning on MFA. Under **Adaptive MFA**, once prompted, users must continue to MFA binding before finishing the current sign-in or sign-up flow.
36+
When **Optional MFA** is selected with a setup prompt enabled (`Ask users to set up MFA during registration` or `Ask users to set up MFA on their sign-in after registration`), Logto first shows an enable-MFA confirmation page titled `Turn on 2-step verification`. Users can choose `Enable 2-step verification` to continue to MFA binding, or skip the prompt and finish the current sign-in or sign-up flow without turning on MFA. Under **Adaptive MFA** or **Mandatory MFA**, users go straight to MFA factor binding without seeing the `Turn on 2-step verification` confirmation page.
3437

3538
:::tip
3639
If you need to prompt a user again after they skipped MFA enrollment, reset their skip state so the setup screen appears the next time they sign in. Admins can use the Management API (`PATCH /api/users/{userId}/logto-configs`), and developers building self-service flows can call the Account API (`PATCH /api/my-account/logto-configs`). [Management API reference](https://openapi.logto.io/operation/operation-updateuserlogtoconfigs) · [Account API reference](https://openapi.logto.io/operation/operation-updatelogtoconfig)
@@ -52,8 +55,8 @@ Once MFA is enabled, users may be prompted to set up MFA during sign-in and sign
5255

5356
1. **Visit sign-in or sign-up page**: The user navigates to the sign-in or sign-up page.
5457
2. **Completes sign-in or sign-up**: The user completes the identity verification process within the sign-in or sign-up flow.
55-
- If **Optional MFA** or **Adaptive MFA** is selected and your prompt policy is enabled, Logto may first show the `Turn on 2-step verification` page before any MFA factor binding starts.
56-
- Under **Optional MFA**, users can skip this page or click `Enable 2-step verification` to continue. Under **Adaptive MFA**, once prompted, users must continue to MFA binding.
58+
- If **Optional MFA** is selected with a setup prompt enabled, Logto first shows the `Turn on 2-step verification` confirmation page, where users can skip MFA setup or click `Enable 2-step verification` to continue.
59+
- Under **Adaptive MFA** or **Mandatory MFA**, users go straight to MFA factor binding without seeing the `Turn on 2-step verification` page and cannot skip setup.
5760
3. **Set up MFA primary factor**: The user is prompted to set up their primary MFA factor (either passkey, Authenticator app OTP, SMS code, or email code).
5861
- If multiple primary factors are enabled, they can choose their preferred option.
5962
- If the primary factor is the same as the sign-up identifier (e.g., SMS or email), it will be pre-verified, allowing users to skip the verification step and proceed directly to the next step (e.g., "Add another one 2-step verification" or "Save your backup factors").
@@ -68,13 +71,14 @@ Users who have set up MFA will be prompted to verify their identity using their
6871

6972
If the user signs in with [passkey sign-in](/end-user-flows/sign-up-and-sign-in/passkey-sign-in), Logto skips the separate MFA verification step. This applies because the passkey used for sign-in is itself a WebAuthn MFA factor.
7073

71-
- If a user has set up only one factor, they will verify it directly.
72-
- If a user has set up multiple factors for 2FA, the system will present verification options based on the following priority rules:
73-
- **Passkey priority**: If the user has a passkey configured, it will be presented as the default verification method.
74-
- **Last-used preference**: If no passkey is available, the system will prioritize the verification method the user last successfully used.
75-
- **Selection list**: If neither of the above priorities apply, the 2-step verification page will display all available bound verification methods for the user to choose from.
76-
- Users can click "Try another method to verify" to switch between different verification options at any time.
77-
- If all the enabled primary factors are not available to the user, and backup code is enabled, they can use the one-time backup code to verify their identity.
74+
- If a user has only one available MFA factor, they will verify it directly.
75+
- If a user has multiple available MFA factors, Logto orders them in a fixed priority order and opens the first available factor directly:
76+
1. **Passkey (WebAuthn)**
77+
2. **Authenticator app OTP (TOTP)**
78+
3. **SMS verification code**
79+
4. **Email verification code**
80+
5. **Backup codes**
81+
- When two or more MFA factors are available, the verification page displays a **Try another method to verify** link so the user can open the method selection list and switch to any of their other available factors (including a one-time backup code if enabled).
7882

7983
<img src="/img/assets/verify-mfa.png" alt="MFA verification flow" />
8084

‎docs/end-user-flows/mfa/email-mfa.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Email verification is one of the most universally accessible MFA methods. It lev
2121
4. Set up the [email template](/connectors/email-connectors/email-templates) for MFA with the dedicated usage types:
2222

2323
- `MfaVerification` usageType for verifying MFA.
24-
- `BindMFA` usageType for binding MFA.
24+
- `BindMfa` usageType for binding MFA.
2525
- Tips: [Logto Email Service](/connectors/email-connectors/built-in-email-service) provides build-in email templates.
2626

2727
5. Refer to [Email connectors](/connectors/email-connectors) for provider-specific setup instructions
@@ -113,14 +113,14 @@ If the email address was verified at sign-up (as the sign-up identifier) but the
113113

114114
When a user with email MFA enabled signs in, after successfully completing primary authentication (1FA), they will be prompted to verify their identity using the email verification code as the second authentication factor (2FA).
115115

116-
If multiple MFA factors are available, users can select from their configured factors. The system determines which MFA factor to prompt first based on the priority order specified in [Configure MFA](/end-user-flows/mfa/configure-mfa#mfa-verification-flow).
116+
If multiple MFA factors are available, Logto opens the highest-priority factor directly according to the fixed order specified in [Configure MFA](/end-user-flows/mfa/configure-mfa#mfa-verification-flow) (Passkey, Authenticator app OTP, SMS verification code, Email verification code, Backup codes). When another factor such as Authenticator app OTP is prompted first, users can click **Try another method to verify** to open the selection list and choose Email verification code instead.
117117

118118
**Examples:**
119119

120120
<details>
121121
<summary>
122-
Sign-in: `Phone number + Password` | MFA: `Email verification code (last time used) /
123-
Authenticator app OTP / Backup codes`
122+
Sign-in: `Phone number + Password` | MFA: `Email verification code / Authenticator app OTP /
123+
Backup codes`
124124
</summary>
125125
<img src="/img/assets/email-mfa-verification-flow.png" alt="Email MFA verification flow" />
126126
</details>

‎docs/end-user-flows/mfa/sms-mfa.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SMS verification, also referred to as Phone Number verification, is one of the m
2020
3. Configure connection parameters.
2121
4. Set up the SMS template for MFA with the dedicated usage types.
2222
- `MfaVerification` usageType for verifying MFA.
23-
- `BindMFA` usageType for binding MFA.
23+
- `BindMfa` usageType for binding MFA.
2424
5. Test the connector functionality to ensure proper message delivery
2525
6. Refer to [SMS connectors](/connectors/sms-connectors) for provider-specific setup instructions
2626

@@ -111,14 +111,14 @@ If the phone number was verified at sign-up (as the sign-up identifier) but the
111111

112112
When a user with SMS MFA enabled signs in, after successfully completing primary authentication (1FA), they will be prompted to verify their identity using the SMS verification code as the second authentication factor (2FA).
113113

114-
If multiple MFA factors are available, users can select from their configured factors. The system determines which MFA factor to prompt first based on the priority order specified in [Configure MFA](/end-user-flows/mfa/configure-mfa#mfa-verification-flow).
114+
If multiple MFA factors are available, Logto opens the highest-priority factor directly according to the fixed order specified in [Configure MFA](/end-user-flows/mfa/configure-mfa#mfa-verification-flow) (Passkey, Authenticator app OTP, SMS verification code, Email verification code, Backup codes). When another factor such as Authenticator app OTP is prompted first, users can click **Try another method to verify** to open the selection list and choose SMS verification code instead.
115115

116116
**Examples:**
117117

118118
<details>
119119
<summary>
120-
Sign-in: `Email address + Password` | MFA: `SMS verification code (last time used) /
121-
Authenticator app OTP / Backup codes`
120+
Sign-in: `Email address + Password` | MFA: `SMS verification code / Authenticator app OTP /
121+
Backup codes`
122122
</summary>
123123
<img src="/img/assets/sms-mfa-verification-flow.png" alt="SMS MFA verification flow" />
124124
</details>

0 commit comments

Comments
 (0)