Sails.js + Passport.js : req.user undefined

Sails.js is a popular express based MVC framework that has been gaining popularity these past few years. Passport.js is used for user authentication purposes. Recently, i was working on one of my projects that involved these two and i came upon a very weird issue which took me a few …