# Restrict multiple logins for a user in SPA application

**URL:** <https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111>\
**Category:** Get Help\
**Tags:** refresh-token-revocation, sessions\
**Created:** [December 1, 2023, 6:06am UTC](https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111 "2023-12-01T06:06:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.sadikot](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@m.sadikot](https://community.auth0.com/u/m.sadikot)\
**Post date:** [December 1, 2023, 6:06am UTC](https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111/1 "2023-12-01T06:06:07Z")

</div>

Hi team,

We have a SPA application that runs on a subscription based model. For this, we want to have a feature where users can only have 2 concurrent active sessions. Is there a way to achieve this? I looked into some similar posts in the community but no solution or approach is provided for the same. This is a very business critical use case for us and something we cannot get around.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 1, 2023, 6:44pm UTC](https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111/3 "2023-12-01T18:44:06Z")

</div>

Hi @m.sadikot,

Welcome to the Auth0 Community!

Unfortunately, AFAIK there isn’t a way to achieve this. In general, if you are using the Universal Login, you will have SSO enabled, which will maintain the user’s session.

Please let me know if you have any questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![m.sadikot](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@m.sadikot](https://community.auth0.com/u/m.sadikot)\
**Post date:** [December 4, 2023, 5:56am UTC](https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111/4 "2023-12-04T05:56:40Z")

</div>

Hi Rueben,

Thanks for a prompt response.

I am using universal login but not SSO. Our customers will mostly use enterprise connection like Azure AD. Is there a way to achieve this through any kind of custom implementation?

I believe its a common use case you might come across.

Thanks,  
Mustafa

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 5, 2023, 5:59pm UTC](https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111/5 "2023-12-05T17:59:02Z")

</div>

Hi @m.sadikot,

Thanks for the update.

> [@m.sadikot](#):
>
> I am using universal login but not SSO.

If you are using Universal Login, you should have SSO. (Reference: [Single Sign-On](https://auth0.com/docs/authenticate/single-sign-on#sso-with-universal-login)).

If this is not the case, could you clarify if you are using embedded authentication?

> [@m.sadikot](#):
>
> Is there a way to achieve this through any kind of custom implementation?

I found a relevant FAQ answering your question: [Cannot maintain multiple user sessions in same browser](https://community.auth0.com/t/cannot-maintain-multiple-user-sessions-in-same-browser/113998)

It seems that one workaround is to use a custom domain with your canonical domain so you can maintain two different sessions at the same time.

Please let me know if you have any questions.

Thanks,  
Rueben

---

<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:** [December 19, 2023, 5:59pm UTC](https://community.auth0.com/t/restrict-multiple-logins-for-a-user-in-spa-application/122111/6 "2023-12-19T17:59:15Z")

</div>

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