Function completeAuthorizationCodeGrant

Attempt to exchange authorization code for bearer token.

Takes the authorization code returned by the OpenID Provider via the authorization URL, and makes a request to the Token Endpoint, to obtain the access token, refresh token, etc.

authorization code as returned by OP during authorization

stored params from start of oidc login flow

valid bearer token response

An Error with message set to an entry in OidcError, when the request fails, or the returned token response is invalid.

  • Experimental

    Parameters

    • code: string
    • state: string

    Returns Promise<{
        homeserverUrl: string;
        identityServerUrl?: string;
        idTokenClaims: IdTokenClaims;
        oidcClientSettings: {
            clientId: string;
            issuer: string;
        };
        tokenResponse: BearerTokenResponse;
    }>

MMNEPVFCICPMFPCPTTAAATR