core.medplumclient.refreshifexpired | Medplum

MedplumClient.refreshIfExpired() method

Refreshes the access token using the refresh token if available.

Signature:

refreshIfExpired(gracePeriod?: number): Promise<void>;

Parameters

Parameter Type Description
gracePeriod number (Optional) Optional grace period in milliseconds. If not specified, uses the client configured grace period (default 5 minutes).

Returns:

Promise

Promise to refresh the access token.