title: How to use passport.socketio in sails with passport
body: <p>I received the following errors when I use socketio after user login. 
  I found passport-socketio that perhaps solve this problem, but I do not know how integrates it to sails.js. Do you know any code example? Thinks</p>
  
  <pre><code>error: TypeError: Object #&lt;Object&gt; has no method 'isAuthenticated'
  at module.exports (/Users/peng/www/321bougez/api/policies/isAuthenticated.js:13:11)
  at _bind.enhancedFn (/Users/peng/www/321bougez/node_modules/sails/lib/router/bind.js:375:4)
  at callbacks (/Users/peng/www/321bougez/node_modules/sails/node_modules/express/lib/router/index.js:164:37)
  at param (/Users/peng/www/321bougez/node_modules/sails/node_modules/express/lib/router/index.js:138:11)
  at param (/Users/peng/www/321bougez/node_modules/sails/node_modules/express/lib/router/index.js:135:11)
  at pass (/Users/peng/www/321bougez/node_modules/sails/node_modules/express/lib/router/index.js:145:5)
  at nextRoute (/Users/peng/www/321bougez/node_modules/sails/node_modules/express/lib/router/index.js:100:7)
  at callbacks (/Users/peng/www/321bougez/node_modules/sails/node_modules/express/lib/router/index.js:167:11)
  at wrapperFn (/Users/peng/www/321bougez/node_modules/sails/lib/hooks/controllers/index.js:293:4)
  at _bind.enhancedFn (/Users/peng/www/321bougez/node_modules/sails/lib/router/bind.js:375:4)
  </code></pre>