mirror of https://github.com/calzoneman/sync.git
Change the way login redirect works
This commit is contained in:
parent
6a4031c188
commit
7b18caa51c
|
@ -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')
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue