mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
only use passport.authenticate if a strategy url is defined
This commit is contained in:
@@ -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') + '/',
|
||||
|
||||
Reference in New Issue
Block a user