S
S
Sergo Sergo2014-11-09 19:40:33
Socket.io
Sergo Sergo, 2014-11-09 19:40:33

Node.js + Socket.io auth check?

the site has authorization implemented through Php. There is a node.js + socket.io chat. I want to make it so that only users authorized on the site can write to the chat. I can't figure out how to implement this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2014-11-09
@Sanasol

When authorizing in PHP, create a token and save it in the database. When connecting to nodejs, send a token to it, and there is already a check in the database whether this token is up to date.
This is instead of doing full customization like in php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question