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
Custom Token Exchange Impersonation via Session Transfer lets a support or admin application log a user into a target web application as a customer — so a support engineer can reproduce the customer's exact experience without knowing their password. The agent is recorded in the `act` claim on the impersonated session, making every impersonation auditable.
457
+
458
+
The flow involves two roles:
459
+
460
+
-**Initiator** — your support/admin app. It requests a short-lived, single-use Session Transfer Token (STT) and redirects the user's browser to the target app carrying the STT.
461
+
-**Target** — the customer's web app. It forwards the STT to `/authorize`, where Auth0 redeems it and establishes a session as the customer.
462
+
463
+
> **Prerequisites (configured via Management API / Dashboard):**
464
+
>
465
+
> - Feature flag `cte_session_transfer_token` must be enabled on the tenant.
466
+
> - The issuing (initiator) client needs `can_create_session_transfer_token: true` and a Custom Token Exchange Action that calls `setActor`.
467
+
> - The redeeming (target) client needs `allow_delegated_access: true` and `"query"` in its allowed authentication methods.
468
+
469
+
### Initiator: requesting an STT and redirecting
470
+
471
+
The user must be logged in to the initiator app — the SDK sources the actor from the session's ID token by default (refreshing it automatically if expired). Run your own authorization check before calling the SDK.
On the target app, forward the `session_transfer_token` query parameter (and `organization` when present) to `/authorize` through the existing `res.oidc.login()` call — no new SDK methods required:
constactor=req.oidc.user.act; // { sub: 'support-agent-007' } when impersonated
557
+
if (actor) {
558
+
// Render an impersonation banner so the agent knows they are acting as the customer.
559
+
}
560
+
res.render('dashboard');
561
+
});
562
+
```
563
+
564
+
## 14. Use a proxy for OIDC requests
454
565
455
566
If you need to route all OIDC HTTP requests (discovery, token, userinfo, etc.) through a proxy, use the `customFetch` option with `undici`'s `ProxyAgent`:
456
567
@@ -473,7 +584,7 @@ app.use(
473
584
474
585
The SDK wraps your `customFetch` function to add required headers (User-Agent, Auth0-Client telemetry) before making requests.
475
586
476
-
## 14. Session expiry from upstream IdP (IPSIE `session_expiry`)
587
+
## 15. Session expiry from upstream IdP (IPSIE `session_expiry`)
477
588
478
589
When an upstream IdP supports the IPSIE SL1 spec, it can include a `session_expiry` claim in the ID token — an absolute Unix timestamp (seconds) marking the latest moment the IdP considers the session valid.
0 commit comments