Skip to content

Function: exchangeServerAuthorizationCode() ​

ts
function exchangeServerAuthorizationCode(params): Promise<OAuth2TokenResponse>;

Defined in: src/core/oauthServer/helpers.ts:113

Exchange the authorization code from the redirect callback for tokens.

Parameters ​

ParameterTypeDescription
params{ clientId: string; clientSecret: string; code: string; fetch?: FetchLike; host: string; redirectUri: string; }-
params.clientIdstring-
params.clientSecretstring-
params.codestring-
params.fetch?FetchLikeThe fetch to reach the instance by. Defaults to the global one.
params.hoststring-
params.redirectUristring-

Returns ​

Promise<OAuth2TokenResponse>