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

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,

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.

Hi Hermamalini Vijayan,

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

Regards

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

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?


Hi Hermamalini Vijayan,


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

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.