Use the config not the env var

This commit is contained in:
Owen
2026-06-22 10:24:16 -04:00
parent 3b68139873
commit d7cfffd92d
7 changed files with 43 additions and 14 deletions
+5 -2
View File
@@ -12,6 +12,7 @@ import { idp, idpOidcConfig } from "@server/db";
import { eq } from "drizzle-orm";
import { encrypt } from "@server/lib/crypto";
import config from "@server/lib/config";
import privateConfig from "@server/private/lib/config";
const paramsSchema = z
.object({
@@ -43,7 +44,6 @@ const UpdateIdpResponseDataSchema = z.object({
idpId: z.number()
});
registry.registerPath({
method: "post",
path: "/idp/{idpId}/oidc",
@@ -115,7 +115,10 @@ export async function updateOidcIdp(
variant
} = parsedBody.data;
if (process.env.IDENTITY_PROVIDER_MODE === "org") {
if (
privateConfig.getRawPrivateConfig().app.identity_provider_mode ===
"org"
) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,