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

    Interface CustomTokenExchangeOptions

    Options for Custom Token Exchange.

    Custom Token Exchange allows exchanging external tokens for Auth0 tokens without a browser redirect. The external token is validated by an Auth0 Action with the Custom Token Exchange trigger.

    interface CustomTokenExchangeOptions {
        actorToken?: string;
        actorTokenType?: string;
        additionalParameters?: Record<string, unknown>;
        audience?: string;
        organization?: string;
        scope?: string;
        subjectToken: string;
        subjectTokenType: string;
    }
    Index

    Properties

    actorToken?: string

    Actor token for delegation/impersonation scenarios (RFC 8693). Represents the identity of the acting party.

    If provided, actorTokenType is required.

    actorTokenType?: string

    Actor token type URI (required if actorToken is provided).

    additionalParameters?: Record<string, unknown>

    Additional custom parameters passed to the token endpoint. Accessible in Auth0 Action via event.request.body.

    Use this for custom parameters instead of index signature to avoid TypeScript issues.

    audience?: string

    The unique identifier of the target API.

    organization?: string

    Organization ID or name for multi-tenant scenarios. The organization ID will be present in the resulting access token claims.

    scope?: string

    Space-delimited OAuth 2.0 scopes.

    Note: These scopes are merged with SDK default scopes (openid profile email offline_access). Duplicates are removed.

    subjectToken: string

    The external token being exchanged. This will be validated by your Auth0 Action with the Custom Token Exchange trigger.

    Validation: Must be a non-empty string.

    subjectTokenType: string

    Custom URI identifying the token type.

    Validation Rules:

    • Must be 10-100 characters
    • Must be a valid URI (URL or URN format)

    Note: Reserved namespaces are validated by Auth0 when creating CTE profiles.

    'urn:acme:legacy-token'
    
    'https://mycompany.com/token-type/v1'