Restrict multiple logins for a user in SPA application

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.

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

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

Hi @m.sadikot,

Thanks for the update.

If you are using Universal Login, you should have SSO. (Reference: Single Sign-On).

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

I found a relevant FAQ answering your question: Cannot maintain multiple user sessions in same browser

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

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