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
+3 -2
View File
@@ -12,6 +12,7 @@ import { idp, idpOidcConfig, idpOrg, orgs } from "@server/db";
import { generateOidcRedirectUrl } from "@server/lib/idp/generateRedirectUrl";
import { encrypt } from "@server/lib/crypto";
import config from "@server/lib/config";
import privateConfig from "@server/private/lib/config";
const paramsSchema = z.strictObject({});
@@ -39,7 +40,6 @@ const CreateIdpResponseDataSchema = z.object({
redirectUrl: z.string()
});
registry.registerPath({
method: "put",
path: "/idp/oidc",
@@ -98,7 +98,8 @@ export async function createOidcIdp(
} = parsedBody.data;
if (
process.env.IDENTITY_PROVIDER_MODE === "org"
privateConfig.getRawPrivateConfig().app.identity_provider_mode ===
"org"
) {
return next(
createHttpError(