# Auth0-react, getAccessTokenSilently and incognito mode, how to fix it?

**URL:** <https://community.auth0.com/t/auth0-react-getaccesstokensilently-and-incognito-mode-how-to-fix-it/84310>\
**Category:** Get Help\
**Tags:** incognito, react\
**Created:** [May 31, 2022, 12:02pm UTC](https://community.auth0.com/t/auth0-react-getaccesstokensilently-and-incognito-mode-how-to-fix-it/84310 "2022-05-31T12:02:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafa](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rafa/32/37733_2.png) [@rafa](https://community.auth0.com/u/rafa)\
**Post date:** [May 31, 2022, 12:02pm UTC](https://community.auth0.com/t/auth0-react-getaccesstokensilently-and-incognito-mode-how-to-fix-it/84310/1 "2022-05-31T12:02:59Z")

</div>

Hello everyone

I am building an app with React and have used the React sdk from Auth0. I save the token in localstorage and everything is fine in normal Chrome mode but in Incognito, due to third-party cookies, it does not work, the getAccessTokenSilently method does not work, how can I solve it so that it also works in incognito mode?

Attached screenshots of index.tsx and file that save token in localstorage

 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/c/ac71f774bf731eb65ddeda67642ef03d586264bd.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/9/e9cfad54db880e17faaec86ac82da741c7a9b876.png)  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/e/2e2299fcfc94d3a02689a80952c778687d5cf7f6.png)  
I know that I have to use the refresh token but I don’t know how to do it exactly… help is appreciated

Please include the following information in your post:

“name”: “@auth0/auth0-react”,  
“version”: “1.10.1”,

“react”: “^17.0.2”,

**Is this a feature request or bug report?** If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.

---

<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:** [June 1, 2022, 12:06am UTC](https://community.auth0.com/t/auth0-react-getaccesstokensilently-and-incognito-mode-how-to-fix-it/84310/4 "2022-06-01T00:06:51Z")

</div>

Hi there @rafa welcome to the community!

Chrome incognito doesn’t allow for third party cookies which is why `getAccessTokenSilently` isn’t working. To solve this, you would need to look into using a [Custom Domain](https://auth0.com/docs/customize/custom-domains) this way there is no reliance on third party cookies.

Hope this helps!

---

<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:** [June 16, 2022, 12:07am UTC](https://community.auth0.com/t/auth0-react-getaccesstokensilently-and-incognito-mode-how-to-fix-it/84310/5 "2022-06-16T00:07:42Z")

</div>

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