misc: added handling of inactive and undefined oidc config

This commit is contained in:
Sheen Capadngan
2024-06-18 19:17:54 +08:00
parent 371b96a13a
commit bcd65333c0

View File

@@ -510,6 +510,12 @@ export const oidcConfigServiceFactory = ({
orgSlug
});
if (!oidcCfg || !oidcCfg.isActive) {
throw new BadRequestError({
message: "Failed to authenticate with OIDC SSO"
});
}
const openIdIssuer = new OpenIdIssuer({
issuer: oidcCfg.issuer,
authorization_endpoint: oidcCfg.authorizationEndpoint,