A
A
agentx0012014-02-20 01:24:53
Socket.io
agentx001, 2014-02-20 01:24:53

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

1 answer(s)
A
Alex_L, 2014-02-23
@agentx001

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 question

Ask a Question

731 491 924 answers to any question