I have the installation of node / Socket.IO on node.mydomain.com and the Apache / PHP stack on www.mydomain.com.
I am currently doing authentication with something like this:
- Client : when connected, send a custom
authorization event that includes PHPSESSID to the server - Server : on
authorization , make an api.php call using this cookie to get information about the user, send this identification information to the client. - Client : actions can now be performed using this identifier
This is a bit kludgy since Socket.IO has a place for authentication (on this wiki ) that I would like to use. The problem is that I do not know how to send PHPSESSID cookie information from the client to the server. They are located in different domains, so the browser does not include them in the request.
Any ideas?
source share