Prevent one user account login from different client at the same time
Hi,
We're creating a user system for our app now. How could we ensure that same account cannot be logged in to multiple client at the same time?
Thanks!
Answer by Bunny83 · Jan 19, 2018 at 02:02 PM
This seems to be off-topic as user and account management would be done on your server. If you use something like PHP you usually connect a user account to a specific sessionID once logged in. It's common practise to actually allow new logins while there is already another one logged in. However this would invalidate the pervious login since you usually only connect one session ID with one account. Preventing login is not a good idea. When the user lost his session the server might not know about that. So the user could not login again until the old session timed out.