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
Copy file name to clipboardExpand all lines: docs/end-user-flows/account-settings/by-account-api.mdx
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,6 +219,10 @@ curl -X POST https://[tenant-id].logto.app/api/my-account/password \
219
219
--data-raw '{"password":"..."}'
220
220
```
221
221
222
+
:::tip
223
+
Just like passwords created during sign-up, passwords set through the Account API must comply with the [password policy](/security/password-policy) you configured in <CloudLinkto="/security/password-policy">Console > Security > Password policy</CloudLink>. Logto returns detailed validation results and error messages if the password fails the policy.
224
+
:::
225
+
222
226
### Update or link new email \{#update-or-link-new-email}
223
227
224
228
:::note
@@ -255,6 +259,10 @@ curl -X POST https://[tenant-id].logto.app/api/my-account/primary-email \
Just like emails collected during sign-up, any email linked through the Account API must pass the [blocklist](/security/blocklist) verification you configured in <CloudLinkto="/security/blocklist">Console > Security > Blocklist</CloudLink>. Logto will reject the request and return a detailed error if the email violates the policy.
264
+
:::
265
+
258
266
### Remove the user's email \{#remove-the-users-email}
259
267
260
268
To remove the user's email, you can use the [`DELETE /api/my-account/primary-email`](https://openapi.logto.io/operation/operation-deleteprimaryemail) endpoint.
Copy file name to clipboardExpand all lines: docs/security/blocklist.md
+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
@@ -28,10 +28,10 @@ For instance, adding `@example.com` to the blocklist will block all email addres
28
28
29
29
:::note
30
30
31
-
Disposable emails, subaddressing, and custom email are restricted during registrationand account linking. Existing users with these email addresses can still sign in.
31
+
Disposable emails, subaddressing, and custom email are restricted during [new-user registration](/end-user-flows/sign-up-and-sign-in/sign-up), [linking email during social sign-in](/end-user-flows/sign-up-and-sign-in/social-sign-in#collect-sign-up-identifiers), and updating emails via [Account API](/end-user-flows/account-settings/by-account-api#update-or-link-new-email). Existing users with these email addresses can still sign in.
32
32
33
33
- Admins can "bypass restrictions" by manually adding users in <CloudLinkto="/users">Console > User management</CloudLink>, or via [Management API](https://openapi.logto.io/operation/operation-createuser). E.g., Create an user with a subaddress email when subaddressing is blocked.
34
-
- Block exsiting accounts by deleting or suspending them in <CloudLinkto="/users">Console > User management</CloudLink>.
34
+
- Block existing accounts by deleting or suspending them in <CloudLinkto="/users">Console > User management</CloudLink>.
Copy file name to clipboardExpand all lines: docs/security/password-policy.mdx
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,12 @@ sidebar_position: 1
6
6
7
7
# Password policy
8
8
9
+
Logto applies the password policy in different ways depending on how the password is created or updated:
10
+
11
+
- End-user flows such as [the out-of-the-box sign-in experience](/end-user-flows/sign-up-and-sign-in/sign-up), [the Experience API](/customization/bring-your-ui), and [the Account API](/end-user-flows/account-settings/by-account-api#update-users-password) always enforce the current [password policy](#set-up-password-policy).
12
+
- Administrator actions via the Management API [`patch /api/users/{userId}/password`](https://openapi.logto.io/operation/operation-updateuserpassword) are exempt, allowing you to provision or reset credentials without policy checks when needed.
13
+
- To audit existing passwords against the current rules, call [`POST /api/sign-in-exp/default/check-password`](https://openapi.logto.io/operation/operation-checkpasswordwithdefaultsigninexperience) and act on the returned validation result. Read [Password compliance check](#password-compliance-check) to learn more.
14
+
9
15
## Set up password policy \{#set-up-password-policy}
10
16
11
17
For new users or users who are updating their password, you can set a password policy to enforce password strength requirements. Visit the <CloudLinkto="/security/password-policy"> Console > Security > Password policy</CloudLink> to configure the password policy settings.
@@ -25,8 +31,11 @@ For new users or users who are updating their password, you can set a password p
25
31
26
32
After you update the password policy in Logto, existing users can still sign in with their current passwords. Only newly created account will be required to follow the updated policy.
27
33
28
-
To enforce stronger security, you can use the `POST /api/sign-in-exp/default/check-password`[API](https://openapi.logto.io/operation/operation-checkpasswordwithdefaultsigninexperience) to check whether a user's password meets the current policy defined in the default sign-in experience. If it doesn't, you can prompt the user to update their password with a custom flow using [Account API](/end-user-flows/account-settings/by-management-api#user-password-management).
34
+
To enforce stronger security, you can use the `POST /api/sign-in-exp/default/check-password`[API](https://openapi.logto.io/operation/operation-checkpasswordwithdefaultsigninexperience) to check whether a user's password meets the current policy defined in the default sign-in experience. If it doesn't, you can prompt the user to update their password with a custom flow using [Account API](/end-user-flows/account-settings/by-account-api).
Copy file name to clipboardExpand all lines: docs/user-management/manage-users.mdx
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,6 +88,12 @@ After you reset the password, copy and send it to the end-user. Once the "Reset
88
88
89
89
You cannot set a specific password for users in the Logto Console, but you can use the [Management API](/integrate-logto/interact-with-management-api)`PATCH /api/users/{userId}/password` to specify a password.
After you update the [password policy](/security/password-policy) in Logto, existing users can still sign in with their current passwords. Only newly created accounts will be required to follow the updated password policy.
94
+
95
+
To enforce stronger security, you can use the `POST /api/sign-in-exp/default/check-password`[API](https://openapi.logto.io/operation/operation-checkpasswordwithdefaultsigninexperience) to check whether a user's password meets the current policy defined in the default sign-in experience. If it doesn't, you can prompt the user to update their password with a custom flow using [Account API](/end-user-flows/account-settings/by-management-api#user-password-management).
96
+
91
97
### Manage roles of users \{#manage-roles-of-users}
92
98
93
99
In the "Roles" tab of the user details page, you can easily assign or remove roles to meet your desired outcome. Check [Role-based access control](/authorization/role-based-access-control) for details.
0 commit comments