Skip to content

feat: add Session Delegation docs - #1624

Open
dlozlla wants to merge 7 commits into
mainfrom
feat/session-delegation
Open

feat: add Session Delegation docs#1624
dlozlla wants to merge 7 commits into
mainfrom
feat/session-delegation

Conversation

@dlozlla

@dlozlla dlozlla commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds public docs for Session Delegation (Custom Token Exchange Phase 2), which lets an authorized actor establish an audited web session as another user via a Session Transfer Token.

  • New top-level nav section under Single Sign-On: an overview page, a configure page (security model + client settings), and a dedicated behavior/monitoring page (session behavior, Organizations, side effects, Actions, audit log types).
  • New use case in cte-example-use-cases.mdx with an Action code sample and an "Important considerations for session delegation" section (audience-based detection, connection-scoped target-app reachability, domain separation, agent logout between sessions).
  • get-token.mdx: Session Transfer Token request/response shape, the confidential-client requirement for STT requests, and error responses.
  • openid-connect-scopes.mdx: clarifies scope-based filtering applies to Action-set claims and Access Tokens, not just ID Tokens.
  • Cross-links from native-to-web docs distinguishing Session Delegation from Native to Web SSO.

Adds public docs for Session Delegation (Custom Token Exchange Phase 2),
which lets an authorized actor establish an audited web session as
another user via a Session Transfer Token.

- New top-level nav section under Single Sign-On: an overview page, a
  configure page (security model + client settings), and a dedicated
  behavior/monitoring page (session behavior, Organizations, side
  effects, Actions, audit log types).
- New use case in cte-example-use-cases.mdx with an Action code sample
  and an "Important considerations for session delegation" section
  (audience-based detection, connection-scoped target-app reachability,
  domain separation, agent logout between sessions).
- get-token.mdx: Session Transfer Token request/response shape, the
  confidential-client requirement for STT requests, and error responses.
- openid-connect-scopes.mdx: clarifies scope-based filtering applies to
  Action-set claims and Access Tokens, not just ID Tokens.
- Cross-links from native-to-web docs distinguishing Session Delegation
  from Native to Web SSO.
@dlozlla
dlozlla requested review from a team as code owners July 27, 2026 17:45
@dlozlla dlozlla added the DO NOT MERGE Only the PR author should merge, even if approved. label Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Status Count
🔍 Total 98
✅ Successful 10
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 88
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0
Full Github Actions output

@mintlify

mintlify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0-docs-staging 🟢 Ready View Preview Jul 27, 2026, 5:51 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0-docs-dev 🟢 Ready View Preview Jul 27, 2026, 5:51 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0 🟢 Ready View Preview Jul 27, 2026, 5:51 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…t/behavior pages

Splits the initial Session Delegation draft into a clearer four-page
structure and tightens content based on team review and developer
persona feedback:

- New "Implement Session Delegation" page: full security model
  (config-time confidentiality through runtime IP binding), a concrete
  CTE request/response example, exact Action responsibilities, the
  browser-redirect redemption flow with organization handling, and
  act-claim handling in the callback.
- "Configure Session Delegation" trimmed to client settings only, with
  the real required JSON (token_exchange, session_transfer device
  binding/refresh-token settings) and matching curl examples.
- "Delegated Session Behavior and Monitoring" (renamed): corrected the
  always-on IP device-binding behavior, merged side effects into the
  main behavior list, and fixed the sdeleacft/fdeleacft log descriptions.
- cte-example-use-cases.mdx: considerations sections are now child
  sections of their use case; Action sample switched to
  setUserByConnection with the connection sourced from subject_token.
- get-token.mdx Remarks trimmed to link out to concepts instead of
  re-explaining them inline.
- Small additions in token-exchange-flow.mdx and the CTE trigger docs
  pointing to Session Delegation.
- Add the official flow diagram to the Session Delegation use case,
  and a Mermaid sequence diagram to the "How it works" overview,
  covering both the token-issuance and redemption parts of the flow.
- Consolidate the "important considerations" content into Implement
  Session Delegation's troubleshooting checklist (per Madhuri's
  review), adding connection-reachability and organization-linkage
  checks she flagged as missing. The use case now links to the full
  Implement Session Delegation article rather than just the
  troubleshooting anchor.
- Remove the actor_token/actor_token_type remark from get-token.mdx,
  redundant with the Body Parameters section (Madhuri's nitpick).
- Match N2W's placeholder convention for the session_transfer audience
  URN (urn:YOUR_AUTH0_TENANT_DOMAIN:session_transfer), per Slack feedback.
- Rename initiate_login_url -> initiate_login_uri throughout (the
  actual Auth0 field name), per Justin's review.
- Remove the orphaned cte_session_transfer_token feature-flag mention
  from get-token.mdx's 400-error table - it's an internal EA gating
  mechanism with no customer-facing config, and had no explanation
  after the Remarks section was trimmed in an earlier pass.
@dlozlla dlozlla added DO NOT MERGE Only the PR author should merge, even if approved. and removed DO NOT MERGE Only the PR author should merge, even if approved. labels Jul 30, 2026
Comment thread main/docs/api/authentication/custom-token-exchange/get-token.mdx Outdated
Comment thread main/docs/api/authentication/custom-token-exchange/get-token.mdx Outdated
Comment thread main/docs/api/authentication/custom-token-exchange/get-token.mdx Outdated

<ParamField body="audience" type="string">
(Optional) The unique identifier of the target API you want to access. The default tenant audience will be used when not present, as configured in [Tenant Settings](https://auth0.com/docs/get-started/tenant-settings).
(Optional) The unique identifier of the target API you want to access. The default tenant audience will be used when not present, as configured in [Tenant Settings](https://auth0.com/docs/get-started/tenant-settings). To request a [Session Transfer Token](/docs/authenticate/single-sign-on/session-delegation) for delegated session establishment instead of an access token, use `urn:{yourDomain}:session_transfer`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(Optional) The unique identifier of the target API you want to access. The default tenant audience will be used when not present, as configured in [Tenant Settings](https://auth0.com/docs/get-started/tenant-settings). To request a [Session Transfer Token](/docs/authenticate/single-sign-on/session-delegation) for delegated session establishment instead of an access token, use `urn:{yourDomain}:session_transfer`.
(Optional) The unique identifier of the target API you want to access. The default tenant audience will be used when not present, as configured in [Tenant Settings](https://auth0.com/docs/get-started/tenant-settings). To request a [Session Transfer Token](/docs/authenticate/single-sign-on/session-delegation) to establish a delegated session instead of an access token, use `urn:{yourDomain}:session_transfer`.

Comment thread main/docs/authenticate/custom-token-exchange/cte-example-use-cases.mdx Outdated
By binding Session Transfer Tokens to the specific device through IP address or ASN, session continuity and security is maintained and ensures the authentication context remains secure throughout the transition.

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
Looking to let a support agent or other authorized actor establish a session **as another user**, rather than moving a user's own session from native to web? Read [Session Delegation](/docs/authenticate/single-sign-on/session-delegation) instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Looking to let a support agent or other authorized actor establish a session **as another user**, rather than moving a user's own session from native to web? Read [Session Delegation](/docs/authenticate/single-sign-on/session-delegation) instead.
If you want a support agent or other authorized actor to establish a session **as another user** rather than move a user's own session from native to web, read [Session Delegation](/docs/authenticate/single-sign-on/session-delegation) instead.

* **Authorization Code flow only.** SAML, WS-Federation, and the Implicit flow are not supported for establishing a delegated session.
* **No refresh tokens.** The `offline_access` scope is excluded from any token issued during a delegated session.
* **No interactive prompts.** MFA, consent, and enrollment prompts (for example, passkey or MFA factor enrollment) cannot be satisfied during a delegated session. If one would be triggered, the request fails with `interaction_required` instead of prompting the user.
* **Existing sessions block delegated access.** If an active Auth0 session already exists for the browser, the delegated session attempt fails with an error page asking the user to log out first. This applies to *any* active session on that domain — the subject user's own session, or a previous delegated session established for a different user — not only a session belonging to the subject user. This is different from standard Native to Web SSO, which revokes the existing session and continues — read [Native to Web SSO and Sessions](/docs/authenticate/single-sign-on/native-to-web/native-to-web-sso-and-sessions) for that comparison.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **Existing sessions block delegated access.** If an active Auth0 session already exists for the browser, the delegated session attempt fails with an error page asking the user to log out first. This applies to *any* active session on that domain — the subject user's own session, or a previous delegated session established for a different user — not only a session belonging to the subject user. This is different from standard Native to Web SSO, which revokes the existing session and continuesread [Native to Web SSO and Sessions](/docs/authenticate/single-sign-on/native-to-web/native-to-web-sso-and-sessions) for that comparison.
* **Existing sessions block delegated access.** If an active Auth0 session already exists for the browser, the delegated session attempt fails with an error page asking the user to log out first. This applies to *any* active session on that domain — the subject user's own session, or a previous delegated session established for a different user — not only a session belonging to the subject user. This is different from standard Native to Web SSO, which revokes the existing session and continues. To learn more, read [Native to Web SSO and Sessions](/docs/authenticate/single-sign-on/native-to-web/native-to-web-sso-and-sessions).

* **Existing sessions block delegated access.** If an active Auth0 session already exists for the browser, the delegated session attempt fails with an error page asking the user to log out first. This applies to *any* active session on that domain — the subject user's own session, or a previous delegated session established for a different user — not only a session belonging to the subject user. This is different from standard Native to Web SSO, which revokes the existing session and continues — read [Native to Web SSO and Sessions](/docs/authenticate/single-sign-on/native-to-web/native-to-web-sso-and-sessions) for that comparison.

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
In practice, this means an actor (for example, a support agent) must log out of a delegated session before a different delegated session can be established for another user on the same domain.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In practice, this means an actor (for example, a support agent) must log out of a delegated session before a different delegated session can be established for another user on the same domain.
The actor, for example, a support agent, must log out of a delegated session before a different delegated session can be established for another user on the same domain.

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
In practice, this means an actor (for example, a support agent) must log out of a delegated session before a different delegated session can be established for another user on the same domain.
</Callout>
* **Ephemeral by default.** The session cookie is set to non-persistent (discarded when the browser closes).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **Ephemeral by default.** The session cookie is set to non-persistent (discarded when the browser closes).
* **Ephemeral by default.** The session cookie is set to non-persistent or discarded when the browser closes.

</Callout>
* **Ephemeral by default.** The session cookie is set to non-persistent (discarded when the browser closes).
* **Fixed 2-hour session lifetime.** Both the absolute and idle timeouts are hard-coded to 2 hours for delegated sessions and are not currently configurable. The issued access token shares this same 2-hour expiration.
* **Device binding.** Delegated sessions always enforce IP-based device binding — this cannot be disabled or changed to ASN, unlike the configurable device binding used by standard Native to Web SSO. Delegated sessions honor `is_token_endpoint_ip_header_trusted` and `auth0-forwarded-for` for determining the trusted IP, the same as Native to Web SSO.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* **Device binding.** Delegated sessions always enforce IP-based device binding — this cannot be disabled or changed to ASN, unlike the configurable device binding used by standard Native to Web SSO. Delegated sessions honor `is_token_endpoint_ip_header_trusted` and `auth0-forwarded-for` for determining the trusted IP, the same as Native to Web SSO.
* **Device binding.** Delegated sessions always enforce IP-based device binding. This cannot be disabled or changed to ASN, unlike the configurable device binding used by standard Native to Web SSO. Delegated sessions honor `is_token_endpoint_ip_header_trusted` and `auth0-forwarded-for` for determining the trusted IP, the same as Native to Web SSO.

@lrzhou25 lrzhou25 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass, left a few suggestions

dlozlla and others added 3 commits July 31, 2026 13:19
Co-authored-by: Lucy Zhou <141781699+lrzhou25@users.noreply.github.com>
Simplify the standard-claims callout to point at the actual claim-setting
mechanism (setCustomClaim() in a postLogin Action) instead of
setUserById()/setUserByConnection(), which select the transaction's user
rather than set claims.
- Fix cliams -> claims typo in openid-connect-scopes.mdx.
- Fix MDX parsing error in session-delegation-behavior-and-monitoring.mdx:
  the nested <Callout> inside a list item needs blank lines and consistent
  2-space indentation on every line to stay associated with the list item,
  matching the convention used elsewhere in the repo (e.g. session-layers.mdx).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE Only the PR author should merge, even if approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants