# Id token and refresh token from in react app

**URL:** <https://community.auth0.com/t/id-token-and-refresh-token-from-in-react-app/63641>\
**Category:** Get Help\
**Created:** [June 1, 2021, 9:41am UTC](https://community.auth0.com/t/id-token-and-refresh-token-from-in-react-app/63641 "2021-06-01T09:41:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [June 1, 2021, 5:34pm UTC](https://community.auth0.com/t/id-token-and-refresh-token-from-in-react-app/63641/3 "2021-06-01T17:34:01Z")

</div>

Hi @praskatti,

The React SDK stores the tokens in app memory by default. You can instead use local storage by adding `cacheLocation="localstorage"` to your `Auth0Provider` component, but there are security considerations with that method which you can read about here:

> **[Token Storage](https://auth0.com/docs/secure/security-guidance/data-security/token-storage)**
>
> Learn how and where to store tokens used in token-based authentication.

The Refresh Token will be returned to your app if:

1. You API is configured to allow offline access: [Register APIs](https://auth0.com/docs/get-started/set-up-apis)
2. The `Auth0Provider` contains the offline\_access scope: `scope="offline_access"`
3. The app is configured to allow refresh token rotation

The SDK will generate a nonce and send it with the `oauth/authorize` request when you call `loginWithRedirect()`:

 ![Screen Shot 2021-06-01 at 1.32.20 PM](https://global.discourse-cdn.com/auth0/original/3X/e/8/e8830b1138a460a60d3e9b1834ee1a91b0d6e35f.png)

---

_[View the full topic](https://community.auth0.com/t/id-token-and-refresh-token-from-in-react-app/63641)._
