0
votes

In auth0, a user authenticates themselves with auth0, then sends an access token to the app so that the app can make API calls. My question is: when the user authenticates themselves with auth0, what does auth0 send back to them? Is it an access token? If so, how does it differ from the access token that the user then sends to the app?

Thanks!

2

2 Answers

0
votes

It gives them a token that you must verify with auth0 servers to make sure it's valid.

0
votes

Auth0 sends back a few different types of tokens to the user.

The main ones are ID Token and Access token (as you have already mentioned).

Consider the following example assuming the setup of a web application & an API.

The user signs in to Auth0 through the web application and gets back the tokens mentioned above. The web application can then store the access token (for example in local storage) and attach this to requests to the API.

The API will see this token and can verify it has been issued by Auth0 and that the user has sent a valid access token. Then the API can know that the user is valid and can respond with privileged info.

To directly answer your question, the access token that the user gets back from Auth0 is the same one that it sends to the API. This will be sent around in jwt form which can be decoded when needed.