decodeJWT

Decodes a JSON Web Token (JWT) and returns the decoded payload and signature.

Example

import { decodeJWT } from "thirdweb/utils";
const { payload, signature } = decodeJWT(jwt);
function decodeJWT(jwt: string): {
payload: JWTPayload;
signature: `0x${string}`;
};

Parameters

The JWT string to decode.

Type

let jwt: string;

Returns

let returnType: { payload: JWTPayload; signature: `0x${string}` };

An object containing the decoded payload and signature.