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?
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>
<COMPUTERNAME>
(in the case of a web application, this will be <IP/Browser>)
<IP/Browser>
and give you a choice between
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.
Blizzard World of Warcraft , .
, , , .
, . , . , , .
"" , , , (, ), , .
, , , . , . ( ) sessionid, , . , , IP, , .
, : .
, , , , :
LM per se, LM (, , "", ...). /, IP- , .. , , , , , (, , ), ..
. , , . .
, .
, IP-, : -.
, - , .
, . , .
.
, , , . , .
, , . , - , , . , .
-, . :
- , 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.
Source: https://habr.com/ru/post/1730215/More articles:Тестирование источников данных при тестировании устройств Android - androidAndroid - Any way to test gestures on an emulator? - androidHow to create a persistent object in Java? - javaAlert dialog box opens - androidHow to enable backup in I18n using globalize2 - ruby-on-railsHow do you use the workflow mechanism? - workflowctags generator for CORBA IDL? - vimChoosing a scripting / authoring tool - buildJQuery error: "$ is undefined" - javascriptHow to return the immutable look of the Java Trove collection? - javaAll Articles