You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ada6573
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -400,15 +400,18 @@ The response body would be like:
400
400
"name": "...",
401
401
"agent": "...",
402
402
"createdAt": "...",
403
-
"updatedAt": "..."
403
+
"lastUsedAt": "..."
404
404
}
405
405
]
406
406
```
407
407
408
408
-`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`).
412
415
413
416
Update the passkey name using [`PATCH /api/my-account/mfa-verifications/{verificationId}/name`](https://openapi.logto.io/operation/operation-updatemfaverificationname) endpoint:
-`skipMfaOnSignIn`: set to `true` to disable 2-step verification for the user, or `false` to enable it.
642
645
643
646
:::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.
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/README.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Authentication factors are the measures that verify your identity. There are var
21
21
| Possession | Something you have | SMS verification code, Authenticator app OTP, Hardware OTP (Security key) |
22
22
| Inherence | Something you are | Biometrics like fingerprints, face ID |
23
23
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).
25
25
26
26
## Why do we need an MFA? \{#why-do-we-need-an-mfa}
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/configure-mfa.mdx
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,12 +25,15 @@ Follow these steps to enable MFAs in users' Logto sign-in flow:
25
25
-**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.
26
26
-**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.
27
27
-**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.
32
35
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.
34
37
35
38
:::tip
36
39
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
52
55
53
56
1.**Visit sign-in or sign-up page**: The user navigates to the sign-in or sign-up page.
54
57
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.
57
60
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).
58
61
- If multiple primary factors are enabled, they can choose their preferred option.
59
62
- 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
68
71
69
72
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.
70
73
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).
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
113
113
114
114
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).
115
115
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.
117
117
118
118
**Examples:**
119
119
120
120
<details>
121
121
<summary>
122
-
Sign-in: `Phone number + Password` | MFA: `Email verification code (last time used) /
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/sms-mfa.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ SMS verification, also referred to as Phone Number verification, is one of the m
20
20
3. Configure connection parameters.
21
21
4. Set up the SMS template for MFA with the dedicated usage types.
22
22
-`MfaVerification` usageType for verifying MFA.
23
-
-`BindMFA` usageType for binding MFA.
23
+
-`BindMfa` usageType for binding MFA.
24
24
5. Test the connector functionality to ensure proper message delivery
25
25
6. Refer to [SMS connectors](/connectors/sms-connectors) for provider-specific setup instructions
26
26
@@ -111,14 +111,14 @@ If the phone number was verified at sign-up (as the sign-up identifier) but the
111
111
112
112
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).
113
113
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.
0 commit comments