fuck me i left in some debug code
This commit is contained in:
parent
05588560a6
commit
7a81bb82eb
@ -39,7 +39,6 @@ function setSession (req, user) {
|
|||||||
function redirectLogin (req, res) {
|
function redirectLogin (req, res) {
|
||||||
let uri = '/'
|
let uri = '/'
|
||||||
|
|
||||||
console.log(req.session.redirectUri, req.session.csrf)
|
|
||||||
if (req.session.redirectUri) {
|
if (req.session.redirectUri) {
|
||||||
uri = req.session.redirectUri
|
uri = req.session.redirectUri
|
||||||
delete req.session.redirectUri
|
delete req.session.redirectUri
|
||||||
|
@ -20,7 +20,6 @@ router.use(oauthLimiter)
|
|||||||
function ensureLoggedIn (req, res, next) {
|
function ensureLoggedIn (req, res, next) {
|
||||||
if (req.session.user) return next()
|
if (req.session.user) return next()
|
||||||
req.session.redirectUri = req.originalUrl
|
req.session.redirectUri = req.originalUrl
|
||||||
console.log('set return uri', req.session.redirectUri, req.session.csrf)
|
|
||||||
res.redirect('/login')
|
res.redirect('/login')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user