I am new to passport and sails.js. I created an user login follow by this article. It's work fine and I can do both login and logout.
However, I try to access current login user in some Controller but I cannot get the user data.
I have reading some topic here and it said something likes this
test : function(req,res){
console.log(req.user);
}
I try this with my TestController.js
module.exports = {
test : function(req,res){
console.log(req.user);
res.send("test");
res.status(200).end();
}
};
I got undefined.