Function safeDecode

Decodes a signed JSON Web Token.

This function does not validate the JWT Claims Set types or values. This function does not validate the JWS Signature.

  • Type Parameters

    • P extends JWTPayload = JWTPayload

    Parameters

    • jwt: string

    Returns Promise<{ error?: undefined; value: P } | { error: Error; value?: undefined }>