Access Express session from socket.io.
Installation
npm install socket-io.sessions
Usage
//configure passport and express var socketIo = socketIoSessions = ; var sio = socketIo; //same attribute than the session middleware http://www.senchalabs.org/connect/middleware-session.html sio; siosockets;
Change the session
sockethandshake;
passport-socket.io
Use with var sessionOptions = key: 'express.sid' secret: 'my session secret' store: mySessionStore ; //chain the two this way: sio;
Develop
npm install npm test
License
MIT - José F. Romaniello 2012.