Auth0_user_login return short access token

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 doesn’t return the value like we get using the “https://faa-org.auth0.com/oauth/token” API.

The access token generated by “auth0_user_login” is very short like this - “krsQJyJy7BVSwsUuNsZQBbQ21w7d24mU” but not like this - “eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik1qWXdNRFpDT1RreE16WXdSVVk1TWpBMk1USkVSVVExUmpOQ1JrTkRSalpET1RKRE0wVkNSQSJ9.eyJodHRwOi8vcmh5dGhtc29mdHdhcmUuY29tL2N1c3RvbWVyX2lkIjoiZmFhLm9yZyIsImh0dHA6Ly9yaHl0aG1zb2Z0d2FyZS5jb20vdGVuYW50X2lkIjoiZmFhLm9yZyIsImlzcyI6Imh0dHBzOi8vZmFhLW9yZy5hdXRoMC5jb20vIiwic3ViIjoiNTN0bXdCZ3hacFhBVHRIcEJmVjA0emNFRnd5cVYxUlFAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vZmFhLW9yZy5hdXRoMC5jb20vYXBpL3YyLyIsImlhdCI6MTYxNjY3MTgyMiwiZXhwIjoxNjE2NzU4MjIyLCJhenAiOiI1M3Rtd0JneFpwWEFUdEhwQmZWMDR6Y0VGd3lxVjFSUSIsInNjb3BlIjoicmVhZDp1c2VycyB1cGRhdGU6dXNlcnMiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.j96K7M1aStC9PuF5U8zeWATxzrZIhTx_rhMmRqsgf0cwooNA_qLQDESURduBcFbmJOtEKv6w2LUGE4UtyPXp_YpIRkHnrlvco_cf2v9V-8q0LrKVkkm-Jj8LIHOjaHvsBRuyYkga67SZbLHhypIcWlzIVJmtWqu9vIcS4VSnfstV9SqvsZnQiejWnJymMx1w42jcx0_3tOcjahBJCSR0pKqI49QQHHMAJfvAfA0sCHCU0LnvexfziDrrMj-KzMQIzanL3jP0yjPljiYlGDdGrHY_U8RvdKOQWFgga-JefhPqgcl__-Lrn5k8QUNcwLRY3XlfNxoG5W0m-snYmEK64A”.

Can you please help and let us know how to get this kind of access token using the ‘auth0_user_login’ action?

Thanks.

Hi @msontakke

You must specify an audience to get a JWT access token. If you do not specify an audience, you get an opaque access token for the /userinfo endpoint.

John

Hi @john.gateley

I tried using the /userinfo API, but it doesn’t return the JWT access token. Please see the attached image for reference. Can you provide me the API which returns the user’s JWT Access token?

Any updates on this?

@john.gateley Any updates on this?

Hi @msontakke

See this: Authentication API Explorer

The audience is a parameter to your /authorize call.

John