Change the way login redirect works

This commit is contained in:
calzoneman 2014-01-16 16:23:55 -06:00
parent 6a4031c188
commit 7b18caa51c
1 changed files with 4 additions and 5 deletions

View File

@ -42,11 +42,7 @@ function handleLogin(req, res) {
expires: new Date(Date.now() + 60*60*1000),
httpOnly: true
});
sendJade(res, 'login', {
loggedIn: true,
loginName: user.name,
redirect: req.body.redirect || req.header('Referrer')
});
res.redirect("back");
}
});
}
@ -77,9 +73,12 @@ function handleLoginPage(req, res) {
*/
function handleLogout(req, res) {
res.clearCookie('auth');
res.redirect("back");
/*
sendJade(res, 'logout', {
redirect: req.body.redirect || req.header('Referrer')
});
*/
}
/**