# getTokenSilently without cache failing on firefox (without redirecting to log-in page)

**URL:** <https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780>\
**Category:** Get Help\
**Tags:** login-prompt-new-experience, login-experience\
**Created:** [April 25, 2024, 1:48pm UTC](https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780 "2024-04-25T13:48:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![diddley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/diddley/32/56672_2.png) [@diddley](https://community.auth0.com/u/diddley)\
**Post date:** [April 25, 2024, 1:48pm UTC](https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780/1 "2024-04-25T13:48:21Z")

</div>

I had noticed a getTokenSilently fail on page refreshes when on most non-chromium browsers (i.e. firefox), which I investigated and partially rectified by enabling refresh tokens and their corresponding fallback. Now, page refreshes don’t require the user to re-authenticate, but as part of my application’s functionality I require the issuing of a new token to the user, which I had called through `getTokenSilently(cacheMode='off')`. This works as desired on chromium-based browsers, but on firefox has the same failure that requires re-authentication on triggering this action (redirecting the user to the log-in page). What are my options here? My configuration is as follows:

```auto
useRefreshTokens='true'
useRefreshTokensFallback='true'
cacheLocation='localstorage'
authorizationParams={{
		redirect_uri: window.location.origin 
		audience: <myaudience>
		scope: "openid profile email offline_access"
 		}}
	    

```

---

<div class="post-metadata">

**Author:** ![diddley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/diddley/32/56672_2.png) [@diddley](https://community.auth0.com/u/diddley)\
**Post date:** [April 26, 2024, 1:21pm UTC](https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780/2 "2024-04-26T13:21:25Z")

</div>

Upon further inspection, it appears the refresh token is not at any point being returned

---

<div class="post-metadata">

**Author:** ![diddley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/diddley/32/56672_2.png) [@diddley](https://community.auth0.com/u/diddley)\
**Post date:** [April 26, 2024, 2:08pm UTC](https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780/3 "2024-04-26T14:08:48Z")

</div>

Fixed by enabling offline\_access in my API page

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/6/e6d223034a5d2a942b1e9588d5aa5fc8a1a45c3c.png)

---

<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:** [April 26, 2024, 3:26pm UTC](https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780/4 "2024-04-26T15:26:48Z")

</div>

Hey @diddley welcome to the community, and thanks for following up with your solution 🙂

---

<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:** [May 10, 2024, 3:27pm UTC](https://community.auth0.com/t/gettokensilently-without-cache-failing-on-firefox-without-redirecting-to-log-in-page/132780/5 "2024-05-10T15:27:20Z")

</div>

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