|
@ -26,7 +26,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// Local Account
|
|
|
// Local Account
|
|
|
|
|
|
|
|
|
if (!appdata.capabilities.manyAuthProviders || (appconfig.auth.local && appconfig.auth.local.enabled)) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.local && appconfig.auth.local.enabled) { |
|
|
const LocalStrategy = require('passport-local').Strategy |
|
|
const LocalStrategy = require('passport-local').Strategy |
|
|
passport.use('local', |
|
|
passport.use('local', |
|
|
new LocalStrategy({ |
|
|
new LocalStrategy({ |
|
@ -53,7 +53,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// Google ID
|
|
|
// Google ID
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.google && appconfig.auth.google.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.google && appconfig.auth.google.enabled) { |
|
|
const GoogleStrategy = require('passport-google-oauth20').Strategy |
|
|
const GoogleStrategy = require('passport-google-oauth20').Strategy |
|
|
passport.use('google', |
|
|
passport.use('google', |
|
|
new GoogleStrategy({ |
|
|
new GoogleStrategy({ |
|
@ -73,7 +73,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// Microsoft Accounts
|
|
|
// Microsoft Accounts
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.microsoft && appconfig.auth.microsoft.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.microsoft && appconfig.auth.microsoft.enabled) { |
|
|
const WindowsLiveStrategy = require('passport-windowslive').Strategy |
|
|
const WindowsLiveStrategy = require('passport-windowslive').Strategy |
|
|
passport.use('windowslive', |
|
|
passport.use('windowslive', |
|
|
new WindowsLiveStrategy({ |
|
|
new WindowsLiveStrategy({ |
|
@ -93,7 +93,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// Facebook
|
|
|
// Facebook
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.facebook && appconfig.auth.facebook.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.facebook && appconfig.auth.facebook.enabled) { |
|
|
const FacebookStrategy = require('passport-facebook').Strategy |
|
|
const FacebookStrategy = require('passport-facebook').Strategy |
|
|
passport.use('facebook', |
|
|
passport.use('facebook', |
|
|
new FacebookStrategy({ |
|
|
new FacebookStrategy({ |
|
@ -114,7 +114,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// GitHub
|
|
|
// GitHub
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.github && appconfig.auth.github.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.github && appconfig.auth.github.enabled) { |
|
|
const GitHubStrategy = require('passport-github2').Strategy |
|
|
const GitHubStrategy = require('passport-github2').Strategy |
|
|
passport.use('github', |
|
|
passport.use('github', |
|
|
new GitHubStrategy({ |
|
|
new GitHubStrategy({ |
|
@ -135,7 +135,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// Slack
|
|
|
// Slack
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.slack && appconfig.auth.slack.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.slack && appconfig.auth.slack.enabled) { |
|
|
const SlackStrategy = require('passport-slack').Strategy |
|
|
const SlackStrategy = require('passport-slack').Strategy |
|
|
passport.use('slack', |
|
|
passport.use('slack', |
|
|
new SlackStrategy({ |
|
|
new SlackStrategy({ |
|
@ -155,7 +155,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// LDAP
|
|
|
// LDAP
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.ldap && appconfig.auth.ldap.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.ldap && appconfig.auth.ldap.enabled) { |
|
|
const LdapStrategy = require('passport-ldapauth').Strategy |
|
|
const LdapStrategy = require('passport-ldapauth').Strategy |
|
|
passport.use('ldapauth', |
|
|
passport.use('ldapauth', |
|
|
new LdapStrategy({ |
|
|
new LdapStrategy({ |
|
@ -189,7 +189,7 @@ module.exports = function (passport) { |
|
|
|
|
|
|
|
|
// AZURE AD
|
|
|
// AZURE AD
|
|
|
|
|
|
|
|
|
if (appdata.capabilities.manyAuthProviders && appconfig.auth.azure && appconfig.auth.azure.enabled) { |
|
|
|
|
|
|
|
|
if (appconfig.auth.azure && appconfig.auth.azure.enabled) { |
|
|
const AzureAdOAuth2Strategy = require('passport-azure-ad-oauth2').Strategy |
|
|
const AzureAdOAuth2Strategy = require('passport-azure-ad-oauth2').Strategy |
|
|
const jwt = require('jsonwebtoken') |
|
|
const jwt = require('jsonwebtoken') |
|
|
passport.use('azure_ad_oauth2', |
|
|
passport.use('azure_ad_oauth2', |
|
|