# Authentication fails (AnomalyDetected, Invalid State) after multiple tabs logout, login in old tab

**URL:** <https://community.auth0.com/t/authentication-fails-anomalydetected-invalid-state-after-multiple-tabs-logout-login-in-old-tab/58793>\
**Category:** Get Help\
**Created:** [March 3, 2021, 6:59am UTC](https://community.auth0.com/t/authentication-fails-anomalydetected-invalid-state-after-multiple-tabs-logout-login-in-old-tab/58793 "2021-03-03T06:59:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [March 8, 2021, 2:51pm UTC](https://community.auth0.com/t/authentication-fails-anomalydetected-invalid-state-after-multiple-tabs-logout-login-in-old-tab/58793/5 "2021-03-08T14:51:52Z")

</div>

Hi @jev,

Does passing `cacheLocation: "localstorage"` correct the behavior?:

```auto
const auth0 = createAuth0Client({
  client_id: AUTH0_CLIENT_ID,
  domain: AUTH0_DOMAIN,
  redirect_uri: AUTH0_REDIRECT_URI,
  audience: AUTH0_AUDIENCE,
 cacheLocation='localstorage'
});

```

I’m wondering if this is caused by the auth data being stored in memory.

---

_[View the full topic](https://community.auth0.com/t/authentication-fails-anomalydetected-invalid-state-after-multiple-tabs-logout-login-in-old-tab/58793)._
