Hello,
We are currently using OutSystems in production and have encountered a technical issue related to concurrent session (duplicate login) control. Given the urgency of this matter, we would greatly appreciate your prompt guidance.
Issue
Concurrent session control is not working as required. Our requirement is:
Environment
What We Have Already Tried
Related Consideration – WebSocket
As part of our investigation into implementing real-time session notifications (e.g., alerting Device A when a new login attempt occurs on Device B), we also reviewed the previous guidance suggesting a WebSocket-based approach. Based on our technical review, it appears that OutSystems does not natively host a WebSocket server endpoint. Implementing WebSocket would require either:
Currently, we do not have the infrastructure in place to support a dedicated WebSocket server, and building one would introduce significant additional operational overhead (deployment, scaling, failover management, etc.), which is difficult for us to accommodate given our current resources.
Our Request
Urgency
This service is already deployed and actively used by field users in a production environment. Additionally, this requirement has been escalated internally by our Security team as a priority item that needs to be addressed as soon as possible. We understand this is a request specific to our internal circumstances, but we would sincerely appreciate your expedited review and guidance so we can move forward quickly.
Thank you very much for your support, and we look forward to your response at your earliest convenience.
Hello @ej ryu
At start you said you wanted to alert the NEW device, but then, when talking about web sockets you mentioned receiving the alert in the original device.
For the first scenario, you probably can change the code of ConcurrentSessionControl to return a warning to the new device instead of terminating the older session. The change shouldn't be hard to make.
For the second scenario, I recommend reading this article: https://medium.com/darwinlabs/using-webhooks-with-server-sent-events-in-outsystems-cd0506af38c9
But bear in mind that if you want to allow the user to decide, from the original device, if they want to allow the login in the new device (terminating the login in the old device), you will have to change the way the login is made and the timeouts, as the new login will have to, somehow, wait for the other device to tell this.
Particularly, even in terms of security and implementation simplicity, I would prefer a "no other logins allowed". But if this is a requirement and the client can't be convinced otherwise, there is some more work to be done.
Hope this helps.
Cheers.
Hi @ej ryu,
Well this can be achieved with a straight forward approach as well.
Like, have an entity for session with following attributes.
Id
UserId
Device Info
IPAddress
LoginInTimeStamp
IsActiveSession.
Login flow
Hope this helps you.
@Rituraj Chouhan : Your suggestion is useful for detecting duplicate logins and blocking a new login when an active session already exists. However, it does not fully address the original requirement, which is to notify the existing device in real time and let the user approve or reject the new login attempt before deciding which session should remain active.
Hello @Siya , I believe notifying device A was not the requirement, it's just an alternative they were thinking of in terms of Related Consideration such as WebSocket etc. for a solution.
You are right. I was looking at the broader discussion where they were also exploring a confirmation-based flow. Your approach addresses the duplicate login detection requirement, but if they decide to support an approval/takeover workflow in the future, it would need an additional real-time notification mechanism, such as Firebase Cloud Messaging (FCM)