diff --git a/packages/features/ee/sso/lib/jackson.ts b/packages/features/ee/sso/lib/jackson.ts index 12289b0654..519199ee44 100644 --- a/packages/features/ee/sso/lib/jackson.ts +++ b/packages/features/ee/sso/lib/jackson.ts @@ -1,9 +1,10 @@ -import jackson, { +import type { IConnectionAPIController, IOAuthController, JacksonOption, ISPSAMLConfig, } from "@boxyhq/saml-jackson"; +import jackson from "@boxyhq/saml-jackson"; import { WEBAPP_URL } from "@calcom/lib/constants"; @@ -27,10 +28,16 @@ let connectionController: IConnectionAPIController; let oauthController: IOAuthController; let samlSPConfig: ISPSAMLConfig; -const g = global as any; +const g = global; + +declare global { + var connectionController: IConnectionAPIController | undefined; + var oauthController: IOAuthController | undefined; + var samlSPConfig: ISPSAMLConfig | undefined; +} export default async function init() { - if (!g.connectionController || !g.oauthController) { + if (!g.connectionController || !g.oauthController || !g.samlSPConfig) { const ret = await jackson(opts); connectionController = ret.connectionAPIController;