Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to tell two users apart? #284

Open
gillerby opened this issue Jul 24, 2021 · 1 comment
Open

Best way to tell two users apart? #284

gillerby opened this issue Jul 24, 2021 · 1 comment

Comments

@gillerby
Copy link
Contributor

gillerby commented Jul 24, 2021

e.g., User A connects to the page, then due to poor internet connection disconnects, then reconnects.

Supposing socket.io's reconnect feature fails, how can I check whether this user is the same as user A?

IP is not a reliable method, since on top two users in the same house can have the same IP and this wouldn't allow to differentiate them.

The socket.id seems to change when you reload the page for example, so for reconnection doesn't seem ideal.

@gillerby gillerby changed the title Best way to identify reconnecting socket? Best way to tell two users apart? Jul 24, 2021
@HeroOfOdyssey
Copy link

have client send a cookie based identifier, preferrably on top of something like a server verified jwt to ensure no MITM or cookie stealing occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants