# How can I avoid Session sharing between 2 SPA (Single Page Application) in the same tenant?

**URL:** <https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984>\
**Category:** Get Help\
**Tags:** authentication-sessions, sessions\
**Created:** [September 23, 2023, 9:12am UTC](https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984 "2023-09-23T09:12:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumeet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumeet/32/48816_2.png) [@sumeet](https://community.auth0.com/u/sumeet)\
**Post date:** [September 23, 2023, 9:12am UTC](https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984/1 "2023-09-23T09:12:40Z")

</div>

Hi,

We have a dev tenant hosting multiple SPAs (Single Page Application).  
Auth0 has assigned a unique ClientID for each SPA and each SPA is using [@auth0/auth0-react - npm](https://www.npmjs.com/package/@auth0/auth0-react) to reduce the boilerplate code.

In its current state, if a user is authenticated in SPA-1 then the user automatically gets authenticated on SPA-2 and both SPA-1 and SPA-2 for the given user share the session.

Is there a way to prevent this behavior? i.e. If a user logs in to SPA-1, opens a new tab, and goes to SPA-2, can we force the user to re-login and prevent this session sharing?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [September 26, 2023, 8:19pm UTC](https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984/3 "2023-09-26T20:19:11Z")

</div>

Hi @sumeet,

Welcome to the Auth0 Community!

You should be able to use the [Auth0 Management API v2](https://auth0.com/docs/api/management/v2/clients/patch-clients-by-id) Patch by client ID endpoint to set

```json
{"sso_disabled":false}

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![sumeet](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumeet/32/48816_2.png) [@sumeet](https://community.auth0.com/u/sumeet)\
**Post date:** [September 26, 2023, 10:17pm UTC](https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984/4 "2023-09-26T22:17:23Z")

</div>

Thanks @dan.woda for your response, let me try that!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [September 27, 2023, 12:27pm UTC](https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984/5 "2023-09-27T12:27:13Z")

</div>

Sounds good. Let us know if it works for you!

---

<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:** [October 11, 2023, 12:28pm UTC](https://community.auth0.com/t/how-can-i-avoid-session-sharing-between-2-spa-single-page-application-in-the-same-tenant/116984/6 "2023-10-11T12:28:12Z")

</div>

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