@auth0/nextjs-auth0 - v4.26.0
    Preparing search index...

    Interface SessionTransferTokenOptions

    Options for requesting a Session Transfer Token (STT).

    The SDK fills in audience, grant_type, actor_token, and actor_token_type automatically. You supply subjectToken and subjectTokenType — your own proof of which customer to impersonate, validated by your Action.

    interface SessionTransferTokenOptions {
        actor?: { token: string; type: string };
        additionalParameters?: Record<string, unknown>;
        organization?: string;
        reason?: string;
        scope?: string;
        subjectToken: string;
        subjectTokenType: string;
    }
    Index
    actor?: { token: string; type: string }

    Explicit actor override. Omit to use the agent session's ID token. If the session ID token is expired but a refresh token is available the SDK refreshes it first. Fails with ACTOR_UNAVAILABLE only when no usable token can be resolved. If that refresh itself requires MFA step-up, an MfaRequiredError is thrown instead. Precedence: explicit actor → session ID token (refreshed if stale) → throws ACTOR_UNAVAILABLE.

    additionalParameters?: Record<string, unknown>

    Additional custom parameters forwarded to the token endpoint. Accessible in your Action via event.request.body.

    organization?: string

    Organization ID or name. Forwarded to /authorize by buildSessionTransferRedirect. Required when the STT is issued in an org context.

    reason?: string

    Reason for impersonation. Forwarded to the token endpoint as a body param and readable by your Action at event.request.body.reason. Must be included in setActor(...) by your Action for it to appear as act.reason.

    scope?: string

    Scopes for the impersonation session tokens. Merged with SDK default scopes (openid, profile, email). Note: offline_access is silently suppressed by Auth0 for impersonation sessions.

    subjectToken: string

    Your proof of which customer to impersonate. Opaque to Auth0 — validated only by your CTE Action via setUserById. The SDK never produces this value.

    subjectTokenType: string

    Your CTE Profile ID that routes the exchange to your Action. Same validation rules as CustomTokenExchangeOptions.subjectTokenType (10–100 chars, valid URI).