I am using Auth0 WordPress plugin for SSO. The plugin works well. However, I would like to extend the requirement and so I am using the “auth0_user_login” action to get the access token of the user. But it returns the Opaque access token e.g. aRPsWnVNDnLRhTTyqJXa_PWxrKM7joOc and not JWT access token.
Can you please provide me assistance on how to get JWT access token based on opaque access token?
Hi @msontakke,
The opaque token is the Access Token you can use for the /userinfo
endpoint to get user profile data. In order to get a JWT for the Access Token, you’ll need to provide an audience
. The audience
is the API Identifier of an API that you have registered with Auth0 (Register APIs).
As described in this topic, you can set the audience
by configuring Extra settings
under the Advanced
tab in the plugin settings like so: {"auth":{"params":{"audience": "http://your-domain.tld/example"}}}
Related docs: Access Tokens
I have set the audience under Extra Settings. But, it still returns the opaque access token and not JWT access token.
Are you using the New or Classic Universal Login Experience? Those settings are used for the Classic Universal Login
Thank you @stephanie.chamblee. That worked.
Great! Glad to hear it!
Are you looking for an Access Token to use with an API, or are you looking for additional information about the user? You may want to try using the ID Token instead of the Access Token since that is always a JWT and is meant to provide profile info to the client.
Yeah! I was looking for an Access Token to use with an API.
Ah, okay! That makes sense!
I can’t find this setting - where can I get to it?
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.