Interface GetTokenSilentlyOptions

interface GetTokenSilentlyOptions {
    authorizationParams?: {
        audience?: string;
        redirect_uri?: string;
        scope?: string;
        [key: string]: any;
    };
    cacheMode?: "on" | "off" | "cache-only";
    detailedResponse?: boolean;
    timeoutInSeconds?: number;
}

Properties

authorizationParams?: {
    audience?: string;
    redirect_uri?: string;
    scope?: string;
    [key: string]: any;
}

Parameters that will be sent back to Auth0 as part of a request.

Type declaration

  • [key: string]: any

    If you need to send custom parameters to the Authorization Server, make sure to use the original parameter name.

  • Optional audience?: string

    The audience that was used in the authentication request

  • Optional redirect_uri?: string

    There's no actual redirect when getting a token silently, but, according to the spec, a redirect_uri param is required. Auth0 uses this parameter to validate that the current origin matches the redirect_uri origin when sending the response. It must be whitelisted in the "Allowed Web Origins" in your Auth0 Application's settings.

  • Optional scope?: string

    The scope that was used in the authentication request

cacheMode?: "on" | "off" | "cache-only"

When off, ignores the cache and always sends a request to Auth0. When cache-only, only reads from the cache and never sends a request to Auth0. Defaults to on, where it both reads from the cache and sends a request to Auth0 as needed.

detailedResponse?: boolean

If true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned (minus refresh_token if one was issued). Otherwise, just the access token is returned.

The default is false.

timeoutInSeconds?: number

A maximum number of seconds to wait before declaring the background /authorize call as failed for timeout Defaults to 60s.