From 10bbbb89420525c3a13dc799737c5514cde886ad Mon Sep 17 00:00:00 2001 From: APXEOLOG Date: Thu, 2 Jul 2015 13:14:50 +0300 Subject: [PATCH] filter:auth.init strategy extension with custom urls --- src/routes/authentication.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/authentication.js b/src/routes/authentication.js index b18038eeb0..53a02a833c 100644 --- a/src/routes/authentication.js +++ b/src/routes/authentication.js @@ -57,8 +57,8 @@ } router.get(strategy.callbackURL, passport.authenticate(strategy.name, { - successReturnToOrRedirect: nconf.get('relative_path') + '/', - failureRedirect: nconf.get('relative_path') + '/login' + successReturnToOrRedirect: nconf.get('relative_path') + (strategy.successUrl !== undefined ? strategy.successUrl : '/'), + failureRedirect: nconf.get('relative_path') + (strategy.failureUrl !== undefined ? strategy.failureUrl : '/login') })); });