Skip to content

Function: refreshServerOAuth2Token() ​

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

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

Refresh an access token against a Data Center instance.

redirectUri is required here where the specification does not ask for it: the Data Center provider validates it on the refresh grant as well, and omitting it earns an invalid_grant that names nothing.

Parameters ​

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

Returns ​

Promise<OAuth2TokenResponse>