1041
Views
7
Comments
Session destroy
Question

How to inactive the previous session when new session is activated in web?

2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Hemamalini Vijayan,

You can take a look in OutSystems documentation here, and maybe you'll find the answer to your question:

https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Sessions_in_Web_Applications

Regards,

2020-02-28 09-46-54
Eduardo Jauch

Hello Hemamalini,

I'll assume you are talking about web, as you are talking about sessions...  (while in mobile you also have a "session"...)

If you are trying a way of allowing a single LOG IN, I would use Ricardo's approach in this topic: https://www.outsystems.com/forums/discussion/19983/prevent-multiple-log-ins-per-user/

If you want to allow the user to login in a different device/browser, you may want to take a look here to take some ideas: https://www.outsystems.com/forums/discussion/35093/how-to-log-out-a-specific-user/

Hope this helps. 

If not, please, try to be more explicit about what you need (your use case).

Cheers.

2025-10-02 14-09-07
Tiago Queirós

Hi Hermamalini Vijayan,

Note your session dies when you close a browser or when made logout

Regards

2018-06-15 00-21-10
Pedro Vila Nova

Hi Hermamalini Vijayan,


you can force a user to logout and like Tiago said, when you make a new login, you will have a new session.


Cheers

UserImage.jpg
Hemamalini Vijayan

Pedro Vila Nova wrote:

Hi Hermamalini Vijayan,


you can force a user to logout and like Tiago said, when you make a new login, you will have a new session.


Cheers

Hi Pedro,

My requirement is when i try to active the new session in another tab, the session which is opened previously should be logout.How can i achieve this?


2018-06-15 00-21-10
Pedro Vila Nova

Hi Hermamalini Vijayan,


You can do logic with the "On Begin Web Request" and compare if the Tokens are the same... for example.

2012-03-16 12-21-09
João Rosado
Staff

How are you testing it? If you logout in a tab you get logout in both.

Also if you login again on the new tab it appears to still be logged on the previous one but it's because browsers share cookies between tabs.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.