interface IBaseTokenClient {
    getAccessTokenFromCode(
        code: string,
        redirect_uri: string,
        client_id?: string,
        client_secret?: string,
        code_verifier?: string,
        scope?: string,
    ): Promise<GetAccessTokenResponse>;
    refreshAccessToken(
        refresh_token: string,
        client_id?: string,
        client_secret?: string,
    ): Promise<GetAccessTokenResponse>;
}

Implemented by

Methods

  • Gets an OAuth access token given an OAuth code

    Parameters

    • code: string

      Authorization code

    • redirect_uri: string

      Authorization endpoint redirect uri

    • Optionalclient_id: string

      OPTIONAL OAuth application client id

    • Optionalclient_secret: string

      OPTIONAL OAuth application client secret. Required for web apps.

    • Optionalcode_verifier: string

      OPTIONAL PKCE code verifier. Required for SPA apps.

    • Optionalscope: string

      OPTIONAL The requested space-delimited scopes for the access token.

    Returns Promise<GetAccessTokenResponse>

  • Gets a refreshed access token given a refresh token

    Parameters

    • refresh_token: string

      Refresh token

    • Optionalclient_id: string

      OPTIONAL OAuth application client id

    • Optionalclient_secret: string

      OPTIONAL OAuth application client secret. Required for web apps.

    Returns Promise<GetAccessTokenResponse>