@shopify/cli-kit
    Preparing search index...

    Interface TokenProvider

    Pluggable strategy for obtaining and refreshing the Admin API access token that the GraphiQL proxy injects into every request.

    • getToken may return a cached token; the proxy calls it for every request.
    • refreshToken (optional) is invoked when the upstream Admin API returns 401. When omitted, the proxy falls back to calling getToken again on 401.

    Implementations must throw TokenRefreshError (or any thrown error) when the token cannot be obtained; the proxy renders the unauthorized template in that case.

    interface TokenProvider {
        getToken: () => Promise<string>;
        refreshToken?: () => Promise<string>;
    }
    Index

    Properties

    getToken: () => Promise<string>
    refreshToken?: () => Promise<string>