When I use Sails.js with Passport.js, the isAuthenticated method does not exist on the req object when requested through websocket.
Could anyone tell me why this hap
Please try to check for req.session.passport.user. It will contain user info when logged in, and will be undefined otherwise. Works for me with any type of request.
I think this happens because in case of WebSocket request, "req" is actually fake request object. It created and passed directly to Express' router, bypassing all Express' middleware, including Passport's one