• Decodes payload of JWT token

    Parameters

    • token: string

      A string representing a token to be decoded

    Returns JWT

    Throws

    Error - Throws error when token is invalid or payload malformed.