Logging in System design that allows each user to register on one machine at a time

How do I create a login system so that each username can only be registered in one place at a time? I want users to not enter their username for logging in so that they can not pay for each user.

If the user has already registered and is trying to log in to another computer, I must block the second login (what could be a problem if the user logged in at work and then tried to return home)? Or should I allow a second login and complete the first login? Or does anyone have a better suggestion?

+3
source share
8 answers

Some Instant Messengers (which can only work with one registered endpoint) have a good way to sort such conflicts. They show a message like

You are already logged in from <COMPUTERNAME>

(in the case of a web application, this will be <IP/Browser>)

and give you a choice between

  • either leave this login (and not log in from your computer), or
  • completing an existing login (and logging on to the current computer).

This is technically the most difficult, but certainly the friendliest way - it ensures that the user has only one session without being too obvious. And there is no bad blood when users cannot log in because they forgot to go to work, etc.

+7
source

Blizzard World of Warcraft , .

, , , .

, . , . , , .

"" , , , (, ), , .


, , , . , . ( ) sessionid, , . , , IP, , .

+2

.

, : .

  • (, "" ) (-, OP , ).
  • /, , "" .
  • - (LM). , LM "" , , ( ).
  • , , .
  • , LM
  • , LM , . , . , .
  • [] LM .

, , , , :

  • , [ ] -, , , / , "" ​​.
  • LM , - , LM, LM, 1/3 .

LM per se, LM (, , "", ...). /, IP- , .. , , , , , (, , ), ..

  • ( /
  • / .
+2

. , , . .

+1

, .

, , , .

+1

, IP-, : -.

, - , .

, . , .

.

0

, , , . , .

, , . , - , , . , .

0

-, . :

- , GUID , . GUID cookie .

Each time a logged-in user gets to any page of your site, you check your cookie GUID and compare it with the GUID that is assigned to them in your database. If these GUIDs do not match, they are logged on to another computer and you are logged out of this session.

This method works very well.

0
source

Source: https://habr.com/ru/post/1730215/


All Articles