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),
|
expires: new Date(Date.now() + 60*60*1000),
|
||||||
httpOnly: true
|
httpOnly: true
|
||||||
});
|
});
|
||||||
sendJade(res, 'login', {
|
res.redirect("back");
|
||||||
loggedIn: true,
|
|
||||||
loginName: user.name,
|
|
||||||
redirect: req.body.redirect || req.header('Referrer')
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -77,9 +73,12 @@ function handleLoginPage(req, res) {
|
||||||
*/
|
*/
|
||||||
function handleLogout(req, res) {
|
function handleLogout(req, res) {
|
||||||
res.clearCookie('auth');
|
res.clearCookie('auth');
|
||||||
|
res.redirect("back");
|
||||||
|
/*
|
||||||
sendJade(res, 'logout', {
|
sendJade(res, 'logout', {
|
||||||
redirect: req.body.redirect || req.header('Referrer')
|
redirect: req.body.redirect || req.header('Referrer')
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue