mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-04 19:51:29 +02:00
dont pass orgId in generate oidc url
This commit is contained in:
@@ -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<string | null>(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) {
|
||||
|
||||
@@ -303,6 +303,7 @@ export default function SmartLoginForm({
|
||||
<IdpLoginButtons
|
||||
idps={[lastUsedIdp]}
|
||||
orgId={lastUsedIdp.orgId}
|
||||
passOrgIdToOidcUrl={false}
|
||||
redirect={redirect}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user