 <p>You can attach session with socket and get in <code>connection</code> event. Get the user session in <code>authorization</code>, if you're using express then do this:</p> <pre><code>var sessionStore = new express.session.MemoryStore(); io.set('authorization', function (handshake, accept){ var cookies = require('express/node_modules/cookie').parse(handshake.headers.cookie); var parsed = require('express/node_modules/connect/lib/utils').parseSignedCookies(cookies, 'SESSION_SECRET'); sessionStore.get(parsed.sid, function (error, session){ if (session != null &amp;&amp; session.user != null){ accept(null, true); handshake.session = session; } }); }); </code></pre> <p>And in your connection event you can get it like:</p> <pre><code>socket.handshake.session </code></pre>