Function tokensPlusInfo

Issues an access token, a refresh token, and returns some additional information about them.

This function returns:

  • an access token (implemented as a JWT)
  • a refresh token (implemented as a random string)
  • some information about the authorization server that issued the tokens
  • the client application that requested the tokens
  • the end-user whose resources the access token grants access to
  • Parameters

    Returns Promise<
        | { error: Error; value?: undefined }
        | {
            error?: undefined;
            value: {
                access_token: string;
                access_token_expires_in: number;
                client_id: string;
                issuer: string;
                jti: string;
                kid: string;
                me: string;
                redirect_uri: string;
                refresh_token: string;
                refresh_token_expires_at: number;
                scope: string;
            };
        },
    >