Skip to content

decodeJwtPayload

decodeJwtPayload(token): Record<string, unknown>

Defined in: packages/core/src/jwt.ts:12

Decodes the payload of a JWT without verifying its signature (RFC 7519 §7.2). Performs base64url decoding and JSON parsing only.

string

A compact-serialized JWT string (header.payload.signature).

Record<string, unknown>

The decoded payload as a key-value record.

OidcError with code INVALID_JWT if the token does not have three parts or the payload cannot be decoded.