From 2db734c846683f265bf5359ca148ee4c24044e7d Mon Sep 17 00:00:00 2001 From: Eden Liu Date: Sat, 17 Jun 2017 00:54:01 +0800 Subject: [PATCH] Update auth.js Assign the currect variable --- ch18/lib/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch18/lib/auth.js b/ch18/lib/auth.js index 3729069..342ac16 100644 --- a/ch18/lib/auth.js +++ b/ch18/lib/auth.js @@ -105,7 +105,7 @@ module.exports = function(app, options){ // we only get here on successful authentication var redirect = req.session.authRedirect; if(redirect) delete req.session.authRedirect; - res.redirect(303, req.query.redirect || options.successRedirect); + res.redirect(303, redirect || options.successRedirect); } ); },