mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-05 12:10:52 +02:00
Use the config not the env var
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user