Fix initialize openid auth strategy

This commit is contained in:
advplyr 2023-11-19 12:57:17 -06:00
parent e07d17c472
commit 89eb857c14
3 changed files with 24 additions and 14 deletions

View file

@ -69,6 +69,11 @@ class Auth {
* Passport use OpenIDClient.Strategy
*/
initAuthStrategyOpenID() {
if (!Database.serverSettings.isOpenIDAuthSettingsValid) {
Logger.error(`[Auth] Cannot init openid auth strategy - invalid settings`)
return
}
const openIdIssuerClient = new OpenIDClient.Issuer({
issuer: global.ServerSettings.authOpenIDIssuerURL,
authorization_endpoint: global.ServerSettings.authOpenIDAuthorizationURL,