Explorar o código

fix: Fixed incorrect count of social auth strategies

[ci skip]
NGPixel %!s(int64=8) %!d(string=hai) anos
pai
achega
6339714b9f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      server/libs/config.js

+ 1 - 1
server/libs/config.js

@@ -49,7 +49,7 @@ module.exports = (confPaths) => {
   if (appdata.capabilities.manyAuthProviders) {
     appconfig.authStrategies = {
       list: _.filter(appconfig.auth, ['enabled', true]),
-      socialEnabled: (_.chain(appconfig.auth).omit('local').reject({ enabled: false }).value().length > 0)
+      socialEnabled: (_.chain(appconfig.auth).omit('local').filter(['enabled', true]).value().length > 0)
     }
     if (appconfig.authStrategies.list.length < 1) {
       console.error(new Error('You must enable at least 1 authentication strategy!'))