Skip to main content

Function: refreshToken()

function refreshToken(token: null | string): Promise<void>

Refreshes the token if it is about to expire.

Parameters

ParameterTypeDescription
tokennull | stringThe 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.

Defined in

src/lib/k8s/api/v1/tokenApi.ts:25