Answer the question
In order to leave comments, you need to log in
Meteor: is it possible to transfer authorization data to socket.io?
What is the point - a game is being written using socket.io, I think using a meteor to make an accompanying website with a forum, news, etc. entering authorization data and at the same time the meteor client code must not be connected.
Answer the question
In order to leave comments, you need to log in
The client is given a loginToken ( habrahabr.ru/post/211020/#loginToken ), which is in window.localStorage. In the game, from the client side, it and the userId are read, given over the socket.io server, where a request is made to the Meteor database (which is MongoDB).
Something like this.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question