From 79716cdf18e9892fb75acb7c8350441c2d93668c Mon Sep 17 00:00:00 2001 From: Rich Date: Sat, 10 Oct 2015 15:02:04 +0100 Subject: [PATCH] Tweaked login redirect to go to requested page --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index d1f5ad5..119190a 100644 --- a/server.js +++ b/server.js @@ -75,7 +75,7 @@ app.get('/login', app.post('/login', passport.authenticate('local', { failureRedirect: '/login' }), function(req, res) { - res.redirect('/'); + res.redirect(req.session.returnTo || '/'); }); app.get('/logout',