Answer the question
In order to leave comments, you need to log in
How to catch unique user in socket.io?
I am developing cards (to improve skills) for two players.
The user connects and there the server recognizes something in order to emit only on it. But when the user refreshes the page, he connects again and the socket recognizes him as a new user.
What to do? How to store a particular dude? Recover data that was made by him?
Answer the question
In order to leave comments, you need to log in
Enter registration and after login give the user a token that will be sent to WS upon connection, for example, with the corresponding message {"action":"authenticate", "token":"dsdsfsdfsdfsdfsdfs"}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question