Skip to content

Node.js based forum software built for the modern web

dont crash if a loginStrategies is undefined

Barış Soner Uşaklıf1a6d395374a
diff --git a/src/routes/authentication.js b/src/routes/authentication.js
index e5173cd456..0068e389b4 100644
--- a/src/routes/authentication.js
+++ b/src/routes/authentication.js
@@ -55,6 +55,7 @@ Auth.reloadRoutes = function (router, callback) {
plugins.fireHook('filter:auth.init', loginStrategies, next);
},
function (loginStrategies, next) {
+ loginStrategies = loginStrategies || [];
loginStrategies.forEach(function (strategy) {
if (strategy.url) {
router.get(strategy.url, Auth.middleware.applyCSRF, function (req, res, next) {