Node.js based forum software built for the modern web
only use passport.authenticate if a strategy url is defined
psychobunnyf6838ef51e3b
diff --git a/src/routes/authentication.js b/src/routes/authentication.jsindex 142c72bada..1cd4331fb4 100644--- a/src/routes/authentication.js+++ b/src/routes/authentication.js@@ -148,9 +148,11 @@for (var i in login_strategies) {if (login_strategies.hasOwnProperty(i)) {var strategy = login_strategies[i];- app.get(strategy.url, passport.authenticate(strategy.name, {- scope: strategy.scope- }));+ if (strategy.url) {+ app.get(strategy.url, passport.authenticate(strategy.name, {+ scope: strategy.scope+ }));+ }app.get(strategy.callbackURL, passport.authenticate(strategy.name, {successRedirect: nconf.get('relative_path') + '/',