Closed Casper-Mars closed 3 years ago
Hey @Casper-Mars , we really appreciate your contribution!
However if you will pull the latest code from master this change is no longer needed.
We were parsing the jwt token twice, once in the middleware (with jwt.MapClaims) and once inside the checkScope (with CustomClaims), this lead to a bug where we couldn't unmarshall the audience because of incompatible types (reference PR: https://github.com/auth0-samples/auth0-golang-api-samples/pull/39 and also fixes issue https://github.com/auth0-samples/auth0-golang-api-samples/issues/36, root issue: https://github.com/auth0/go-jwt-middleware/issues/81) and it was also unnecessary to do twice.
Please let us know in case you encounter any other issues!
add log output when parse token fail