refreshToken()
refreshToken(
token:string):Promise<AuthTokens>
Defined in: packages/core/src/index.ts:248
Refresh the access token using a refresh token
Parameters
| Parameter | Type | Description |
|---|---|---|
token | string | The refresh token from a previous authentication |
Returns
Promise<AuthTokens>
New authentication tokens
Throws
401 - Invalid or expired refresh token
Example
import { refreshToken } from "@cpod/sdk";
const newTokens = await refreshToken(storedRefreshToken);