40144: Invalid JWT token

invalid_jwt

A JWT presented for authentication could not be parsed. The token was not well-formed, so it could not be read as a valid JSON Web Token.

What you should do

Check how the JWT is generated. It must be well-formed, signed with a supported algorithm, and carry the required claims such as iat and exp. Correct the token generation on your auth server and reissue.

Why it happens

A JWT presented for authentication couldn't be decoded or verified. Causes include a malformed token, an unsupported or deprecated signing algorithm, a missing key identifier (kid) in the header, or missing or empty required claims such as iat or exp.

What you'll see

The error is reported with code 40144 and HTTP status 401. The message is typically Unexpected exception decoding token; err = .... Some malformed-claim cases instead report status 400 with a message naming the claim, such as Invalid token; iat must be specified.