Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/integrate-logto/protected-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,23 @@ app.get('/', (req, res) => {
app.listen(3000);
```

## Customize ID token claims \{#customize-id-token-claims}

By default, the `Logto-ID-Token` header includes standard OIDC claims (for example `sub`, `name`, and `email`). To include [extended claims](/developers/custom-id-token#extended-claims) such as roles or organization data, both of the following must be configured:

1. **Tenant toggle**: Enable the claim in <CloudLink to="/customize-jwt">Console > Custom JWT > ID token</CloudLink>.
2. **Protected App scopes**: In your Protected App settings, select the matching scope under **ID token claims** > **Additional scopes**.

Extended claims are included in the forwarded ID token only when the claim is enabled in Custom JWT and the corresponding scope is selected for the Protected App. See [Custom ID token](/developers/custom-id-token) for the full list of extended scopes and claims.

| Scope | Claims |
| ------------------------------------ | ------------------------------------ |
| `custom_data` | `custom_data` |
| `identities` | `identities`, `sso_identities` |
| `roles` | `roles` |
| `urn:logto:scope:organizations` | `organizations`, `organization_data` |
| `urn:logto:scope:organization_roles` | `organization_roles` |

## Get the original host \{#get-the-original-host}

If you need to get the original host requested by the client, you can use the `Logto-Host` or `x-forwarded-host` header.
Expand Down
Loading