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:
|
return Base64Encode([]byte(`{"alg":"` + alg + `","typ":"JWT"}`)) |
Cloudflare doc: https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/
Thank you.