diff --git a/src/components/IdpLoginButtons.tsx b/src/components/IdpLoginButtons.tsx index 0adccc9c6..54daa6d63 100644 --- a/src/components/IdpLoginButtons.tsx +++ b/src/components/IdpLoginButtons.tsx @@ -26,12 +26,14 @@ type IdpLoginButtonsProps = { idps: LoginFormIDP[]; redirect?: string; orgId?: string; + passOrgIdToOidcUrl?: boolean; }; export default function IdpLoginButtons({ idps, redirect, - orgId + orgId, + passOrgIdToOidcUrl = true }: IdpLoginButtonsProps) { const [error, setError] = useState(null); const t = useTranslations(); @@ -68,12 +70,13 @@ export default function IdpLoginButtons({ let redirectToUrl: string | undefined; try { - console.log("generating", idpId, redirect || "/", orgId); + const oidcOrgId = passOrgIdToOidcUrl ? orgId : undefined; + console.log("generating", idpId, redirect || "/", oidcOrgId); const safeRedirect = cleanRedirect(redirect || "/"); const response = await generateOidcUrlProxy( idpId, safeRedirect, - orgId + oidcOrgId ); if (response.error) { diff --git a/src/components/SmartLoginForm.tsx b/src/components/SmartLoginForm.tsx index de1955771..a56ad6e75 100644 --- a/src/components/SmartLoginForm.tsx +++ b/src/components/SmartLoginForm.tsx @@ -303,6 +303,7 @@ export default function SmartLoginForm({ )}