# Invalidating the application session on logout

**URL:** <https://community.auth0.com/t/invalidating-the-application-session-on-logout/111794>\
**Category:** Get Help\
**Tags:** sessions, logout\
**Created:** [July 21, 2023, 11:29am UTC](https://community.auth0.com/t/invalidating-the-application-session-on-logout/111794 "2023-07-21T11:29:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammad.akbar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mohammad.akbar/32/33313_2.png) [@mohammad.akbar](https://community.auth0.com/u/mohammad.akbar)\
**Post date:** [July 21, 2023, 11:29am UTC](https://community.auth0.com/t/invalidating-the-application-session-on-logout/111794/1 "2023-07-21T11:29:46Z")

</div>

Hi,

I’m using react-spa and currently encountering an issue regarding session management across multiple tabs within my application. Specifically, I’ve noticed that when I log in to my application on two separate tabs and subsequently log out from one of them, I’m still able to perform operations on the second tab until I manually refresh the page.

I am seeking advice and suggestions to implement a solution that can invalidate the session on the application level, effectively ensuring consistent and secure session management.

Any insights or guidance on this matter would be greatly appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 31, 2023, 9:10pm UTC](https://community.auth0.com/t/invalidating-the-application-session-on-logout/111794/2 "2023-07-31T21:10:23Z")

</div>

Hi @mohammad.akbar

Welcome back to the Auth0 Community!

Thanks for posting your question.

I’ve found that one of the user had similar question to your a while back I’m reposting provided solution:

> [@How to check if user has logged out in another tab?](https://community.auth0.com/t/how-to-check-if-user-has-logged-out-in-another-tab/56324/4):
>
> It looks like if you set the cacheLocation on the Auth0Provider to ‘localstorage’ other tabs will be able to pick up that the user has logged out. ReactDOM.render( \<Auth0Provider domain={config.domain} clientId={config.clientId} audience={config.audience} redirectUri={window.location.origin} onRedirectCallback={onRedirectCallback} useRefreshTokens={true} cacheLocation="localstorage" \> \<App /\> \</Auth0Provider\>, document.getElementById("root") ); Note abou…

I hope it will help you!

Thanks, and have a great day!

Dawid

---

<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:** [August 14, 2023, 9:10pm UTC](https://community.auth0.com/t/invalidating-the-application-session-on-logout/111794/3 "2023-08-14T21:10:34Z")

</div>

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