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/developers/signing-keys.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
@@ -7,7 +7,7 @@ sidebar_position: 5
7
7
8
8
# Signing keys
9
9
10
-
Logto [OIDC signing keys](https://auth.wiki/signing-key), as known as "OIDC private keys" and "OIDC cookie keys", are the signing keys used to sign JWTs ([access tokens](https://auth.wiki/access-token) and [ID tokens](https://auth.wiki/id-token)) and browser cookies in Logto [sign-in sessions](/end-user-flows/sign-out#sign-in-session). These signing keys are generated when seeding Logto database ([open-source](/logto-oss)) or creating a new tenant ([Cloud](/logto-cloud)) and can be managed through [CLI](/logto-oss/using-cli) (open-source), Management APIs or Console UI.
10
+
Logto [OIDC signing keys](https://auth.wiki/signing-key), as known as "OIDC private keys" and "OIDC cookie keys", are the signing keys used to sign JWTs ([access tokens](https://auth.wiki/access-token) and [ID tokens](https://auth.wiki/id-token)) and browser cookies in Logto [sign-in sessions](/end-user-flows/sign-out#what-is-a-logto-session). These signing keys are generated when seeding Logto database ([open-source](/logto-oss)) or creating a new tenant ([Cloud](/logto-cloud)) and can be managed through [CLI](/logto-oss/using-cli) (open-source), Management APIs or Console UI.
11
11
12
12
By default, Logto uses the elliptic curve (EC) algorithm to generate digital signatures. However, considering that users often need to verify JWT signatures and many older tools do not support the EC algorithm (only supporting RSA), we have implemented the functionality to rotate private keys and allow users to choose the signature algorithm (including both RSA and EC). This ensures compatibility with services that use outdated signature verification tools.
Copy file name to clipboardExpand all lines: docs/end-user-flows/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 @@ End-user flows cover all verification processes for user interactions, categoriz
21
21
|[Magic link (One-time token)](/end-user-flows/one-time-token)| <ul><li>Organization member invitation</li><li>User invitation when registration is disabled</li><li>Sign in or sign up using magic link</li></ul> |
| Collect user profile | <ul><li>[Collect additional user data during sign-up](/end-user-flows/collect-user-profile)</li></ul> |
24
-
|[Sign-out](/end-user-flows/sign-out)| <ul><li>[Clear tokens and local session at the client side](/end-user-flows/sign-out/#clear-tokens-and-local-session-at-the-client-side)</li><li>[Clear sign-in session at Logto](/end-user-flows/sign-out/#clear-sign-in-session-at-logto)</li><li>[Federated sign-out: Back-channel logout](/end-user-flows/sign-out/#federated-sign-out-back-channel-logout)</li></ul>|
24
+
|[Sign-out](/end-user-flows/sign-out)| <ul><li>[Clear tokens and local session at the client side](/end-user-flows/sign-out/#1-client-side-only-sign-out)</li><li>[Clear sign-in session at Logto](/end-user-flows/sign-out/#2-end-session-at-logto-global-sign-out-in-current-logto-implementation)</li><li>[Federated sign-out: Back-channel logout](/end-user-flows/sign-out/#federated-sign-out-back-channel-logout)</li></ul> |
25
25
26
26
This section introduces Logto’s pre-built UI for a streamlined sign-in experience, helping you accelerate time-to-market. For more flexibility in customizing your sign-in UI, try the “[Bring Your UI](/customization/bring-your-ui)” feature with Logto Experience APIs.
|**Permission model**| Toggle which fields are enabled via Account center settings | Toggle which Account APIs are enabled via Management API | Fully customizable by developers |
96
-
|**Supported features**| Update: email, phone, username, password, MFA (TOTP, passkeys, backup codes) | View, update, and delete: username, email, phone, password, social accounts, MFA, profile| All basic settings + Delete/suspend/restore account, Personal access tokens, user impersonation, connect OAuth apps, etc.|
97
-
|**UI customization**| Inherits sign-in experience branding | Full customization (build your own UI) | Full customization (build your own UI) |
98
-
|**Setup complexity**| None (just link to prebuilt pages) | Low (use APIs with your UI) | Medium to high (requires custom implementation) |
99
-
|**When to use**| For the fastest way to add account management without building custom pages | When you need custom UI but want to leverage Logto's secure APIs | When Account APIs don't meet your needs. E.g., for complex account deletion logic, high-risk actions, or building back-office tools |
|**Permission model**| Toggle which fields are enabled via Account center settings | Toggle which Account APIs are enabled via Management API | Fully customizable by developers |
96
+
|**Supported features**| Update: email, phone, username, password, MFA (TOTP, passkeys, backup codes) | View, update, and delete: username, email, phone, password, social accounts, MFA, profile, sessions | All basic settings + Delete/suspend/restore account, Personal access tokens, user impersonation, connect OAuth apps, session, etc. |
97
+
|**UI customization**| Inherits sign-in experience branding | Full customization (build your own UI) | Full customization (build your own UI) |
98
+
|**Setup complexity**| None (just link to prebuilt pages) | Low (use APIs with your UI) | Medium to high (requires custom implementation) |
99
+
|**When to use**| For the fastest way to add account management without building custom pages | When you need custom UI but want to leverage Logto's secure APIs | When Account APIs don't meet your needs. E.g., for complex account deletion logic, high-risk actions, or building back-office tools |
Copy file name to clipboardExpand all lines: docs/end-user-flows/account-settings/by-account-api.mdx
+51-1Lines changed: 51 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ Some frequent use cases are listed below:
23
23
- Update user password
24
24
- Update user identities including email, phone, and social connections
25
25
- Manage MFA factors (verifications)
26
+
- Manage user sessions
26
27
27
28
To learn more about the available APIs, please visit [Logto Account API Reference](https://openapi.logto.io/group/endpoint-my-account) and [Logto Verification API Reference](https://openapi.logto.io/group/endpoint-verifications).
28
29
@@ -47,7 +48,11 @@ Once enabled, configure per-field permissions for identifiers, profile data, and
47
48
2.**Profile fields**:
48
49
- Fields include: username, name, avatar, [profile](/user-management/user-data#profile) (other standard profile attributes), and [custom data](/user-management/user-data#custom-data).
49
50
- End users can edit these without additional verification.
50
-
3.**Secret vault**: For OIDC or OAuth social and enterprise connectors, Logto [secret vault](/secret-vault/federated-token-set) securely stores third-party access and refresh tokens after authentication. Apps can then call external APIs, such as syncing Google Calendar events, without prompting users to sign in again. Token retrieval becomes available automatically once the Account API is enabled.
51
+
3.**Secret vault**:
52
+
- For OIDC or OAuth social and enterprise connectors, Logto [secret vault](/secret-vault/federated-token-set) securely stores third-party access and refresh tokens after authentication. Apps can then call external APIs, such as syncing Google Calendar events, without prompting users to sign in again. Token retrieval becomes available automatically once the Account API is enabled.
53
+
4.**Session management**:
54
+
- When enabled, users can view and manage their active sessions, including device information and last sign-in time. Users can also revoke sessions to log out from specific devices.
55
+
- Before end users access session management, they must verify their identity via password, email, or SMS to obtain a 10-minute verification record ID. See [Get a verification record id](#get-a-verification-record-id).
51
56
52
57
## How to access Account API \{#how-to-access-account-api}
53
58
@@ -69,6 +74,7 @@ const config: LogtoConfig = {
69
74
UserScope.Address, // To manage address
70
75
UserScope.Identities, // For identity and MFA related APIs
71
76
UserScope.Profile, // To manage user profile
77
+
UserScope.Sessions, // To manage user sessions
72
78
],
73
79
};
74
80
```
@@ -663,3 +669,47 @@ The response body would be like:
663
669
664
670
-`code`: the backup code.
665
671
-`usedAt`: the timestamp when the code was used, `null` if not used yet.
672
+
673
+
### Manage user sessions \{#manage-user-sessions}
674
+
675
+
**List active sessions**
676
+
677
+
To list the user's active sessions, you can use the [`GET /api/my-account/sessions`](https://openapi.logto.io/operation/operation-getsessions) endpoint.
678
+
679
+
:::note
680
+
681
+
-`UserScope.Sessions` scope is required to access this endpoint.
682
+
-`Sessions` field in account center settings must be set to `ReadOnly` or `Edit`.
To revoke a specific session, use the [`DELETE /api/my-account/sessions/{sessionId}`](https://openapi.logto.io/operation/operation-deletesessionbyid) endpoint.
696
+
697
+
:::note
698
+
699
+
-`UserScope.Sessions` scope is required to access this endpoint.
700
+
-`Sessions` field in account center settings must be set to `Edit`.
-`revokeGrantsTarget`: Optionally specify the target of the grants to revoke along with the session. Possible values:
713
+
-`all`: Revoke all grants associated with the session.
714
+
-`firstParty`: Revoke only first-party app grants associated with the session. (Recommended for most use cases, as it revokes access for your own app while keeping third-party app grants intact, providing a better user experience.)
715
+
- unspecified: Default behavior revokes grants that does not have `offline_access` scope, which typically means revoking non-refresh-token grants for the session.
| GET |[/api/users/\{userId\}/sessions](https://openapi.logto.io/operation/operation-listusersessions)| Get user sessions by user ID. |
203
+
| GET |[/api/users/\{userId\}/sessions/\{sessionId\}](https://openapi.logto.io/operation/operation-getusersession)| Get a user session by session ID. |
204
+
| DELETE |[/api/users/\{userId\}/sessions/\{sessionId\}](https://openapi.logto.io/operation/operation-deleteusersession)| Delete a user session by session ID. |
0 commit comments