Skip to main content
Version: 1.13.1

Function: refreshCantonAuthorizationCodeToken()

refreshCantonAuthorizationCodeToken(config: AuthorizationCodeAuthConfig, refreshToken: string, options?: OAuthRequestOptions): Promise<AccessToken>

Defined in: canton/authentication/authorization-code.ts:357

Refresh an access token using the refresh_token grant (RFC 6749 §6).

Parameters

ParameterTypeDescription
configAuthorizationCodeAuthConfigAuthorization code config (with authUrl, clientId).
refreshTokenstringThe refresh token from a prior exchangeAuthorizationCode.
options?OAuthRequestOptionsOptional fetch override and abort signal.

Returns

Promise<AccessToken>

A fresh AccessToken (with a new refreshToken when rotated).

Throws

CCIPError (CANTON_AUTH_ERROR) on refresh failure.

See

https://datatracker.ietf.org/doc/html/rfc6749#section-6