jed/authom — Issue #10: request to integrate with express
Author: conanchen
Created: 2011-12-15 14:39:44+00:00
State: open

app.use(express.session({
secret: 'xxx',
store: memoryStore,
}));

i want to set session in authom.on("auth", function(req, res, data) {
req.session.auth=true;
req.session.username= data.user.Name;
})

so that i can check whether user is authenticated or not in express

app.get("secpath",function(){
if(!req.session.auth) redirect("/auth/github"); //<-- but i can not get req.session.auth value as true, the session lost!
})