Decode access_token?

How i can decode access_token given by auth0 authentication ?

1 Like

Hi @oussbak16,

Welcome to the Community!

When an audience is provided in the authorize request, then the Access Token will be a JWT that you can decode using a library such as the ones listed on https://jwt.io/.

If an audience is not provided, then an opaque token will be returned to your app, which cannot be decoded.

For more information on this, you can take a look at this FAQ:

https://community.auth0.com/t/why-is-my-access-token-not-a-jwt-opaque-token/31028/4

2 Likes

Thank you for your reply,
I’m not sending request to /autorize endpoint, I’m using passport-auth0 Auth0Strategy (NodeJs, expressJs) , how i can pass this audience to get a jwt access_token and not an Opaque token

Thank you for clarifying that! Could you please share the code in your app where you are getting the opaque Access Token (be sure to remove any sensitive data such as tenant name, client ID and client secret). Thanks!