lara124366's avatar

How to prevent users from making multiple sessions

How to prevent users from making multiple sessions, I need to make sure that the account is used on one device.

0 likes
6 replies
jlrdw's avatar

This was once discussed, you could perhaps as logging in get the id from database as well, then see if that id is the current auth id, if so display a friendly message....

I am guessing you mean only one device at a time.

lara124366's avatar

I did this, but what if the user closed the window and didn't logout? in this case the session will still active waiting to be logout out or timeouted.

Snapey's avatar

If you invalidate other sessions during login then sessions on other devices are closed and only the current session is active.

If the user logs in on their phone, then logs in on their pc then the phone session is immediately terminated.

Please or to participate in this conversation.