forbidden two session with same username

23 views
Skip to first unread message

giorgio.s...@gmail.com

unread,
Aug 11, 2021, 11:00:33 AM8/11/21
to Xataface
Is possible to close session if user login with same username or not allow Multiple session with single user Id?

Steve Hannah

unread,
Aug 11, 2021, 11:47:58 AM8/11/21
to xata...@googlegroups.com
This is deceptively complicated to do well.  Xataface doesn't do this out of the box. You can store the session ID in the database after the user logs in.  You can then compare the session ID to known session IDs for the user on each request....  If you deem that this session ID is not the right one, you could display a message to the user to this effect. Complications arise when the user doesn't have access to the device that is currently logged in, so they can't log out there.  Then you would want to give them ability to override and become the current session.  That could also be achieved with the database strategy.  Store things like session ID, username, last request time, and a boolean flagging whether it is the "current" session.  

On Wed, Aug 11, 2021 at 8:00 AM giorgio.s...@gmail.com <giorgio.s...@gmail.com> wrote:
Is possible to close session if user login with same username or not allow Multiple session with single user Id?

--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xataface/0dd276c0-871e-4060-96d2-07879c13decfn%40googlegroups.com.


--
Steve Hannah
Web Lite Solutions Corp.

giorgio.s...@gmail.com

unread,
Nov 9, 2021, 1:22:50 PM11/9/21
to Xataface
Ok thx!
Reply all
Reply to author
Forward
0 new messages