# Authentication is lost after page refresh

**URL:** <https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030>\
**Category:** Get Help\
**Created:** [April 13, 2021, 3:50pm UTC](https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030 "2021-04-13T15:50:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoshuaAYoung](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joshuaayoung/32/28767_2.png) [@JoshuaAYoung](https://community.auth0.com/u/JoshuaAYoung)\
**Post date:** [April 13, 2021, 3:50pm UTC](https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030/1 "2021-04-13T15:50:16Z")

</div>

We have had a working auth0 setup for a year or so and after a recent update made by auth0, we are having this very same issue with isAuthenticated. We haven’t changed our login scripts for 6 months at a least. Please look into this. This is breaking the workflow for our users.

---

<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:** [April 13, 2021, 4:03pm UTC](https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030/2 "2021-04-13T16:03:03Z")

</div>

Hi @JoshuaAYoung,

I went ahead and moved this response to a new topic from the topic [How to keep login session when refreshing page in SPA](https://community.auth0.com/t/how-to-keep-login-session-when-refreshing-page-in-spa/60858)

To see if this might be caused by blocked third-party cookies as described in the [FAQ](https://community.auth0.com/t/why-is-authentication-lost-after-refreshing-my-single-page-application/56276), have you tried temporarily configuring your browser to allow third-party cookies?

chrome://settings/cookies

---

<div class="post-metadata">

**Author:** ![JoshuaAYoung](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/joshuaayoung/32/28767_2.png) [@JoshuaAYoung](https://community.auth0.com/u/JoshuaAYoung)\
**Post date:** [April 13, 2021, 6:01pm UTC](https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030/3 "2021-04-13T18:01:41Z")

</div>

We haven’t changed anything about our auth0 setup for the last 6 months and our users just started to experience this issue. We cannot tell all of our users to turn on third-party cookies. There has to have been something changed in the way auth0 deals with session storage in the last few weeks. Would love to know what that is and how to reverse it. Do I need to change the “type” of application from an SPA (even though it IS an spa) in order to save the session when changing tabs?

---

<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:** [April 13, 2021, 6:11pm UTC](https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030/4 "2021-04-13T18:11:36Z")

</div>

Hi @JoshuaAYoung,

I’m not aware of any recent changes in how sessions are dealt with that would cause auth to be lost. Blocked third-party cookies are an increasing cause of this behavior because it is the default setting in some browsers, including Safari.

Changing the type of application should not affect this behavior. I’d suggest testing your application with third-party cookies blocked in the browser and not blocked in the browser in order to confirm if that is the issue. If the auth is lost after refresh _only_ when third-party cookies are blocked, then that will confirm why the auth is lost after refresh.

Once confirmed, you can resolve the issue by either using a Custom Domain or adjusting the cache location that is set in the `Auth0Provider` component. A code example is provided here: [Why is authentication lost after refreshing my single page application?](https://community.auth0.com/t/why-is-authentication-lost-after-refreshing-my-single-page-application/56276)

---

<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:** [April 28, 2021, 6:11pm UTC](https://community.auth0.com/t/authentication-is-lost-after-page-refresh/61030/5 "2021-04-28T18:11:51Z")

</div>

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