I’am having an error validating a JWT issued by auth0 with multiple audiences.
"json: cannot unmarshal array into Go struct field accessTokenData.aud of type string"
I’am using the Authorization: Bearer <token>
header from a SPA (angular). I cannot use the jwtTokenString
header because I get a CORS error.
So, reading the RFC 7519, I found that :
In the general case, the “aud” value is an array of case-sensitive strings, each containing a StringOrURI value . In the special case when the JWT has one audience, the “aud” value MAY be a single case-sensitive string containing a StringOrURI value.
So the pb seems to be at your side because you don’t support this multiple audiences token.
Is there any chances to have this kind of JWT working with your api?
thank you