Function: refreshToken()
function refreshToken(token: null | string): Promise<void>
Refreshes the token if it is about to expire.
Parameters
| Parameter | Type | Description |
|---|---|---|
token | null | string | The token to refresh. For null token it just does nothing. |
Returns
Promise<void>
Note
Sets the token with setToken if the token is refreshed.
Note
Uses global isTokenRefreshInProgress to prevent multiple token
refreshes at the same time.