bnoguchi/everyauth — Issue #113: req.loggedIn
Author: guiomie
Created: 2011-11-19 03:43:38+00:00
State: open

My code used to work, and after a few days of not touching it because cloud9ide wasn't working properly, it stopped working. I always get a req.loggedin as undefined with everyauth module. I do a simple :

app.get('/view/:htmlpage', function(req, res){
console.log(req);
if(req.loggedIn) {
res.sendfile('./views/' + req.params.htmlpage + '.html');
}
else{

res.send('You need to be authenticated with a Facebook');

}
});

The req prints:

{ sessions:

// IGNORED ALL KIND OF STUFF //

"loggedIn":true,"userId":"4ec448e67a06792a32000006"}}' },
hash: [Function],
generate: [Function] },

What is wrong? everything seems find, but I still get undefined...? Could it be related to recent upgrade of the module?