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 b9a2845
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/concepts/core-service/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
@@ -100,7 +100,7 @@ To better understand the user flows and implementation details:
100
100
Account API is a comprehensive set of APIs that gives the end users direct API access without needing to go through the Management API, here is the highlights:
101
101
102
102
- Direct access: The Account API empowers end users to directly access and manage their own account profile without requiring the relay of Management API.
103
-
- User profile and identities management: Users can fully manage their profiles and security settings, including the ability to update identity information like email, phone, and password, as well as manage social connections. MFA and SSO support are coming soon.
103
+
- User profile and identities management: Users can manage their profiles and security settings, including email, phone, password, social connections, and MFA factors, as well as retrieve Secret Vault tokens for linked social and enterprise SSO connections.
104
104
- Global access control: Admin has full, global control over access settings, can customize each fields.
105
105
- Seamless authorization: Authorizing is easier than ever! Simply use `client.getAccessToken()` to obtain an opaque access token for OP (Logto), and attach it to the Authorization header as `Bearer <access_token>`.
Copy file name to clipboardExpand all lines: docs/end-user-flows/account-settings/by-account-api.mdx
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ sidebar_position: 1
10
10
The Logto Account API is a comprehensive set of APIs that gives end users direct API access without needing to go through the Management API. Here are the highlights:
11
11
12
12
- Direct access: The Account API empowers end users to directly access and manage their own account profiles without requiring the relay of Management API.
13
-
- User profile and identities management: Users can fully manage their profiles and security settings, including the ability to update identity information like email, phone, and password, as well as manage social connections. MFA and SSO support are coming soon.
13
+
- User profile and identities management: Users can manage their profiles and security settings, including email, phone, password, social connections, and MFA factors, as well as retrieve enterprise SSO federated access tokens from Secret Vault.
14
14
- Global access control: Admins have full, global control over access settings and can customize each field.
15
15
- Seamless authorization: Authorization is easier than ever! Simply use `client.getAccessToken()` to obtain an opaque access token for OP (Logto), and attach it to the Authorization header as `Bearer <access_token>`.
16
16
@@ -30,7 +30,7 @@ To learn more about the available APIs, please visit [Logto Account API Referenc
30
30
31
31
:::note
32
32
33
-
SSO account viewing and account deletion features are currently available through the Logto Management APIs. See [Account settings by Management API](/end-user-flows/account-settings/by-management-api) for implementation details.
33
+
SSO account viewing and account deletion features are currently available through the Logto Management APIs (linking or unlinking enterprise SSO identities is not available in the Account API; only retrieving Secret Vault tokens for linked SSO identities is supported). See [Account settings by Management API](/end-user-flows/account-settings/by-management-api) for implementation details.
34
34
35
35
:::
36
36
@@ -280,7 +280,7 @@ Remember to [enable MFA and WebAuthn](/end-user-flows/mfa) first.
280
280
:::
281
281
282
282
:::note
283
-
To use this method, you need to enable the `mfa` field in the [account center settings](#how-to-enable-account-api).
283
+
WebAuthn passkey write endpoints (`POST /api/my-account/mfa-verifications` with `type: "WebAuthn"`, `PATCH /api/my-account/mfa-verifications/{verificationId}/name`, and `DELETE /api/my-account/mfa-verifications/{verificationId}` for WebAuthn) are controlled by the `passkey` field in [account center settings](#how-to-enable-account-api), falling back to `mfa` when `passkey` is unset. Reading `GET /api/my-account/mfa-verifications` requires `mfa` to be set to `ReadOnly` or `Edit`.
284
284
:::
285
285
286
286
**Step 1: Add your front-end app origin to the related origins**
@@ -571,7 +571,7 @@ curl -X POST https://[tenant-id].logto.app/api/my-account/mfa-verifications \
571
571
:::note
572
572
573
573
- A user can only have one set of backup codes at a time. If all codes have been used, the user needs to generate and bind new codes.
574
-
- Backup codes cannot be the only MFA factor. The user must have at least one other MFA factor (such as WebAuthn or TOTP) enabled.
574
+
- Backup codes cannot be the only MFA factor. The user must have an authenticator app (`Totp`) or passkey (`WebAuthn`) factor configured; email or SMS verification codes alone do not satisfy this requirement.
575
575
- Each backup code can only be used once.
576
576
577
577
:::
@@ -626,10 +626,16 @@ The response body would be like:
626
626
627
627
```json
628
628
{
629
-
"skipMfaOnSignIn": false
629
+
"skipMfaOnSignIn": false,
630
+
"enabled": true,
631
+
"required": false
630
632
}
631
633
```
632
634
635
+
-`skipMfaOnSignIn`: whether the user has chosen to skip MFA verification prompts on sign-in.
636
+
-`enabled` (optional): whether MFA verification is enabled for the user (`undefined` for legacy accounts created before this field was introduced, which Logto treats as enabled when usable factors exist).
637
+
-`required` (read-only): whether MFA is required by the tenant policy (including **Mandatory** and **Adaptive MFA** non-skippable policies), a per-user requirement, or an organization, making `skipMfaOnSignIn` and `enabled: false` ineffective.
638
+
633
639
**Update MFA settings**
634
640
635
641
To enable or disable 2-step verification, use the [`PATCH /api/my-account/mfa-settings`](https://openapi.logto.io/operation/operation-updatemfasettings) endpoint.
-`skipMfaOnSignIn`: set to `true` to disable 2-step verification for the user, or `false` to enable it.
650
+
-`skipMfaOnSignIn`: set to `true` to disable 2-step verification prompt on sign-in for the user, or `false` to enable it.
651
+
-`enabled` (optional): set to `true` or `false` to update whether MFA verification is enabled for the user. The response includes the updated `skipMfaOnSignIn`, `enabled`, and read-only `required` fields.
645
652
646
653
:::note
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.
654
+
`skipMfaOnSignIn` and `enabled: false`only take 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, both `skipMfaOnSignIn`and `enabled: false` are ignored and MFA is enforced (`required` is `true`). Under **Adaptive MFA**, `required` is also `true` and both settings are ignored, though MFA verification is prompted only when a risk rule triggers.
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/authenticator-app-otp.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
@@ -14,7 +14,7 @@ Popular examples of software tokens include Google Authenticator, Microsoft Auth
14
14
15
15
1. Navigate to <CloudLinkto="/mfa">Console > Multi-factor authentication</CloudLink>
16
16
2. Enable the "Authenticator App OTP" factor. Recommend to use Authenticator App OTP in combination with other MFA factors (passkeys, SMS, backup codes) to reduce single-factor dependency.
17
-
3. Configure your preferred MFA policy (required vs. optional)
17
+
3. Configure your preferred MFA policy (optional, adaptive, or mandatory)
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/backup-codes.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,18 @@ Backup codes, also known as Recovery code, is a one-time use code for MFA, actin
10
10
11
11
Losing them can lead to account recovery challenges. Therefore, it's recommended to set up an additional primary factor before enabling Backup Codes, giving it priority.
12
12
13
-
Logto automatically generates 10 Backup Codes for users once they configure an additional factor. Each code is single-use. Users are advised to regenerate a new set of codes in the User Account Settings (accessible through the [Management API](/integrate-logto/interact-with-management-api/)) before using up all the existing codes.
13
+
Logto automatically generates 10 Backup Codes for users once they configure an additional factor. Each code is single-use. Users can regenerate a new set of codes through the [prebuilt Account Center UI](/end-user-flows/account-settings/by-account-center-ui) (`/account/backup-codes/regenerate`), a custom self-service interface built with the [Account API](/end-user-flows/account-settings/by-account-api#manage-backup-codes), or admin tooling using the [Management API](/end-user-flows/account-settings/by-management-api#user-mfa-settings-management) before using up all the existing codes.
14
14
15
15
## Configure backup codes for MFA \{#configure-backup-codes-for-mfa}
16
16
17
17
1. Navigate to <CloudLinkto="/mfa">Console > Multi-factor authentication</CloudLink>
18
18
2. Enable the "Backup Codes" factor. Backup codes cannot be used as the sole MFA factor. It is required to use backup codes in combination with other primary MFA factors (passkeys, authenticator app, SMS, email).
19
-
3. Configure your preferred MFA policy (required vs. optional)
19
+
3. Configure your preferred MFA policy (optional, adaptive, or mandatory)
You can use the Account API to build custom account management interfaces where users can view, regenerate, and remove their backup codes. This enables users to manage their recovery options directly from your application's account settings.
24
+
Users can view and regenerate their backup codes using the [prebuilt Account Center UI](/end-user-flows/account-settings/by-account-center-ui) (`/account/backup-codes/manage` and `/account/backup-codes/regenerate`). You can also use the Account API to build custom account management interfaces where users can view, regenerate, and remove their backup codes. This enables users to manage their recovery options directly from your application's account settings.
25
25
26
26
For detailed implementation steps and API endpoints, see [Account settings by Account API](/end-user-flows/account-settings/by-account-api#manage-backup-codes).
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/configure-mfa.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,18 +22,18 @@ Follow these steps to enable MFAs in users' Logto sign-in flow:
22
22
2. Backup factors:
23
23
-[Backup codes](/end-user-flows/mfa/backup-codes): This serves as a backup option when users can't verify any of the primary factors mentioned above. Enabling this option reduces friction for users' access successfully.
24
24
3. Choose the **Require MFA** policy from the dropdown. This policy controls when users must complete MFA during sign-in:
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
-
-**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
-
-**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** is selected, configure the MFA setup prompt policy:
25
+
-**Optional MFA** (_Optional MFA: Let users choose to enable MFA for their own account security_): 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
+
-**Adaptive MFA** (_Adaptive MFA: Only ask for MFA when a sign-in seems risky (e.g., new country / long inactivity)_): 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
+
-**Mandatory MFA** (_Mandatory MFA: Requires all users to complete MFA every time they sign in_): 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** is selected, configure the **MFA set-up prompt** policy:
29
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):
30
+
-**Ask users to set up MFA during registration (skippable, one-time prompt)**: 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 next sign-in attempt after registration (skippable, one-time prompt)**: 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 **MFA set-up prompt** policies are supported (**Do not ask users to set up MFA** is not available):
33
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
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.
35
35
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.
36
+
When **Optional MFA** is selected with a setup prompt enabled (`Ask users to set up MFA during registration (skippable, one-time prompt)` or `Ask users to set up MFA on their next sign-in attempt after registration (skippable, one-time prompt)`), 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.
37
37
38
38
:::tip
39
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)
@@ -45,7 +45,7 @@ If you need to prompt a user again after they skipped MFA enrollment, reset thei
45
45
46
46
For products with a multi-tenant architecture that support [Organizations](/organizations), in most cases you don't need to require MFA for all users. Instead, MFA can be enabled on a per-organization basis, allowing you to tailor the requirements based on each client's needs. To get started, refer to [Requiring MFA for organization members](/organizations/organization-management#require-mfa-for-organization-members).
47
47
48
-
In the **Multi-factor authentication**section, set **MFA setup prompt for users after organization enables MFA** to **Ask users to set up MFA on next sign-in (no skipping)**. Members of any organization that requires MFA will then be prompted to complete MFA setup at their next sign-in, and the prompt cannot be skipped.
48
+
When **Optional MFA** is selected in the **Require MFA**dropdown, Console displays the **MFA setup prompt for users after organization enables MFA**setting. Set it to **Ask users to set up MFA on next sign-in (non-skippable)** so members of any organization that requires MFA are prompted to complete MFA setup at their next sign-in and cannot skip it. (This setting is hidden in Console when **Adaptive MFA** or **Mandatory MFA** is selected.)
49
49
50
50
## MFA user flow \{#mfa-user-flow}
51
51
@@ -109,7 +109,7 @@ Learn more about implementing these patterns with [Account API](/end-user-flows/
109
109
In the <CloudLinkto="/user"> Console > User management</CloudLink>, administrators can manage user MFA settings effectively:
110
110
111
111
-**View user MFA status**: Check which MFA factors are enabled for each user.
112
-
-**Remove user MFA**: Delete all MFA factors for a user, requiring them to set up MFA again.
112
+
-**Remove user MFA**: Remove stored MFA factors one by one. Implicit email or SMS verification code rows cannot be removed directly from this table, and when passkey sign-in is enabled, passkey (WebAuthn) rows have no remove button here and are managed under the **Passkeys** section on the same user details page.
Copy file name to clipboardExpand all lines: docs/end-user-flows/mfa/email-mfa.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Email verification is one of the most universally accessible MFA methods. It lev
30
30
31
31
1. Navigate to <CloudLinkto="/mfa">Console > Multi-factor authentication</CloudLink>
32
32
2. Enable the "Email verification code" factor. Recommend to use email MFA in combination with other MFA factors (TOTP, passkeys, SMS, backup codes) to reduce single-factor dependency.
33
-
3. Configure your preferred MFA policy (required vs. optional)
33
+
3. Configure your preferred MFA policy (optional, adaptive, or mandatory)
34
34
4. Save your configuration changes
35
35
36
36
:::note Important usage considerations
@@ -143,5 +143,5 @@ If multiple MFA factors are available, Logto opens the highest-priority factor d
143
143
- Handling: Prompt user to request new verification code
0 commit comments