# Basic Auth0 question about JWT id\_tokens and Universal Login flow

**URL:** <https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [September 7, 2023, 12:10am UTC](https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605 "2023-09-07T00:10:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidaventimiglia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidaventimiglia/32/50399_2.png) [@davidaventimiglia](https://community.auth0.com/u/davidaventimiglia)\
**Post date:** [September 7, 2023, 12:10am UTC](https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605/1 "2023-09-07T00:10:28Z")

</div>

Hi! I’m a newbie struggling to wrap my head around Auth0 and I’ve a basic question (well, many, but here’s the first one).

Does the JWT id\_token ever get passed from Auth0 to a user’s browser, so that they can then use it to identify themselves to a web application (let’s say, PHP), perhaps storing it as a cookie, or not?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 7, 2023, 12:36am UTC](https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605/3 "2023-09-07T00:36:45Z")

</div>

Hey @davidaventimiglia welcome to the community!

> [@davidaventimiglia](#):
>
> Hi! I’m a newbie struggling to wrap my head around Auth0 and I’ve a basic question (well, many, but here’s the first one).

Totally understandable, there’s a lot to learn!

> [@davidaventimiglia](#):
>
> Does the JWT id\_token ever get passed from Auth0 to a user’s browser, so that they can then use it to identify themselves to a web application (let’s say, PHP), perhaps storing it as a cookie, or not?

The ID token does indeed get passed from Auth0 (the authorization server) to a user’s browser. Token’s are typically [stored in memory](https://auth0.com/docs/secure/security-guidance/data-security/token-storage#browser-in-memory-scenarios), but can also be stored in local storage. An ID token is the result of user _authentication_ whereas an access token is the result of _authorization_. Here’s a super helpful [video](https://www.youtube.com/watch?v=vVM1Tpu9QB4) explaining the difference 🙂

The following documentation is also helpful in providing a high level overview (I reference it often as a refresher):

> **[Architecture Scenarios](https://auth0.com/docs/get-started/architecture-scenarios)**
>
> Learn about common Auth0 architecture scenarios that you can use to solve your authorization and authentication needs.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![davidaventimiglia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/davidaventimiglia/32/50399_2.png) [@davidaventimiglia](https://community.auth0.com/u/davidaventimiglia)\
**Post date:** [September 7, 2023, 1:02am UTC](https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605/4 "2023-09-07T01:02:52Z")

</div>

Thank you for your help!!! If I wear out your patience, just let me know, but I do have a few follow-up questions.

1. There’s an id\_token and an access\_token, and the former I guess identifies the user and proves that they’ve logged into (been validated by) Auth0, whereas the latter I guess grants access to an API. Question: do I _need_ both? It seems like the id\_token is essential, but I can’t figure out a use for the access\_token in my application.
2. Is it possible to achieve token storage (id\_token and/or access\_token) in the browser in memory or local storage without JavaScript and the Auth0 SDK? I’m guessing “no” but again I’m trying to build up an accurate mental model of this stuff.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 7, 2023, 1:20am UTC](https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605/5 "2023-09-07T01:20:31Z")

</div>

Happy to help!

> [@davidaventimiglia](#):
>
> There’s an id\_token and an access\_token, and the former I guess identifies the user and proves that they’ve logged into (been validated by) Auth0, whereas the latter I guess grants access to an API. Question: do I _need_ both? It seems like the id\_token is essential, but I can’t figure out a use for the access\_token in my application.

The access token is used to call an API - Typically, this is added as a header in a request to an external API at which point the API verifies it and additionally checks for permissions. Some libraries that do this can be found here.

> [@davidaventimiglia](#):
>
> Is it possible to achieve token storage (id\_token and/or access\_token) in the browser in memory or local storage without JavaScript and the Auth0 SDK? I’m guessing “no” but again I’m trying to build up an accurate mental model of this stuff.

You can technically use the [Authentication API](https://auth0.com/docs/api#authentication-api) to carry out most login functionality typically managed by Auth0 SDKS - The API will return tokens, but storage would be entirely up to you at that point without an SDK.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 21, 2023, 1:20am UTC](https://community.auth0.com/t/basic-auth0-question-about-jwt-id-tokens-and-universal-login-flow/115605/6 "2023-09-21T01:20:41Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
