Auth0 Home Blog Docs

In Auth0-SPA-JS, how do I get the user (`id_token`)?

Question: In auth0-spa-js, how do I get the user (id_token)?

Solution:

You can get the id_token using the getUser call.

For example, after authenticating, you could call the Auth0 Client like this:

const user = await auth0Client.getUser();

Supporting Documentation:

2 Likes