A
A
Alex Wells2015-10-06 18:04:31
JavaScript
Alex Wells, 2015-10-06 18:04:31

How to bind Socket to ID from client?

Hello. There is such a situation. Site on Laravel, authorization on the site ONLY through Steam. The database stores all data, including SteamID. This is what needs to be passed to the socket.io server on node js. Moreover, so that it would be possible to accurately distinguish steamids absolutely exactly, so that it would not be possible to simply change the line in JS on the client side (on the site) and wow, you are logged in and can manage the admin panel (the admin panel also works through socket.io ). How to do it? again, a variant of the usual type transfer

socket.on('connection', function() {
    socket.emit('id', STEAMID);
});

does not fit the definition. Are there other ways? Database access is available on both sides.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question