kataras / kataras/jwt

"Unexpected token algorithm" error when validating CloudFlare's JWT

Open
#13 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
212
Forks
26
PR merge metrics
No merged PRs in 30d

Description

Hello,
I'm trying to validate Cloudflare Zero Trust JWT, but I'm getting the error "jwt: unexpected token algorithm". Looking at the code, I think the problem is related to this line the compares the header, since the JWT from CF doesn't have the "typ" field.

The line: https://github.com/kataras/jwt/blob/d03e03aaf19da85fc083eccc404d8f102e1c1641/token.go#L169

Cloudflare doc: https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/

Thank you.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.