From 149573a87857b1d67bbbfc893e4777c30f1d7e38 Mon Sep 17 00:00:00 2001 From: mstrhakr <37352843+mstrhakr@users.noreply.github.com> Date: Fri, 8 Apr 2022 11:38:55 -0400 Subject: [PATCH] swapped to working passport oidc module --- meshcentral.js | 2 +- webserver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshcentral.js b/meshcentral.js index 2ea3897c..812246e7 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -3495,7 +3495,7 @@ function mainStart() { if ((typeof config.domains[i].authstrategies.github == 'object') && (typeof config.domains[i].authstrategies.github.clientid == 'string') && (typeof config.domains[i].authstrategies.github.clientsecret == 'string') && (passport.indexOf('passport-github2') == -1)) { passport.push('passport-github2'); } if ((typeof config.domains[i].authstrategies.reddit == 'object') && (typeof config.domains[i].authstrategies.reddit.clientid == 'string') && (typeof config.domains[i].authstrategies.reddit.clientsecret == 'string') && (passport.indexOf('passport-reddit') == -1)) { passport.push('passport-reddit'); } if ((typeof config.domains[i].authstrategies.azure == 'object') && (typeof config.domains[i].authstrategies.azure.clientid == 'string') && (typeof config.domains[i].authstrategies.azure.clientsecret == 'string') && (typeof config.domains[i].authstrategies.azure.tenantid == 'string') && (passport.indexOf('passport-azure-oauth2') == -1)) { passport.push('passport-azure-oauth2'); passport.push('jwt-simple'); } - if ((typeof config.domains[i].authstrategies.oidc == 'object') && (typeof config.domains[i].authstrategies.oidc.clientid == 'string') && (typeof config.domains[i].authstrategies.oidc.clientsecret == 'string') && (passport.indexOf('passport-openidconnect') == -1)) { passport.push('passport-openidconnect'); } + if ((typeof config.domains[i].authstrategies.oidc == 'object') && (typeof config.domains[i].authstrategies.oidc.clientid == 'string') && (typeof config.domains[i].authstrategies.oidc.clientsecret == 'string') && (passport.indexOf('passport-generic-oidc') == -1)) { passport.push('passport-generic-oidc'); } if ((typeof config.domains[i].authstrategies.saml == 'object') || (typeof config.domains[i].authstrategies.jumpcloud == 'object')) { passport.push('passport-saml'); } } if (config.domains[i].sessionrecording != null) { sessionRecording = true; } diff --git a/webserver.js b/webserver.js index 55e4aaa9..c5f2cf87 100644 --- a/webserver.js +++ b/webserver.js @@ -6255,7 +6255,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF responseMode: 'form_post' , state: true }; - const OIDCStrategy = require('passport-openidconnect'); + const OIDCStrategy = require('passport-generic-oidc'); if (typeof domain.authstrategies.oidc.callbackurl == 'string') { options.callbackURL = domain.authstrategies.oidc.callbackurl; } else { options.callbackURL = url + 'oidc-callback'; } parent.debug('web', 'Adding Generic OIDC SSO with options: ' + JSON.stringify(options)); passport.use('openidconnect', new OIDCStrategy.Strategy(options,