refreshJWT

Refreshes a JSON Web Token (JWT) by encoding a new payload with updated expiration time.

Example

import { refreshJWT } from "thirdweb/utils";
const jwt = await refreshJWT({
account,
jwt,
expirationTime: 1000 * 60 * 60,
});
function refreshJWT(options: RefreshJWTParams): Promise<string>;

Parameters

The options for refreshing the JWT.

Type

let options: {
account: Account;
expirationTime?: number;
jwt: string;
};

Returns

let returnType: Promise<string>;

A Promise that resolves to the refreshed JWT.