mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Redirect users to SAML portal on change org to SAML org
This commit is contained in:
@@ -314,13 +314,16 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
return (
|
return (
|
||||||
<DropdownMenuItem key={org.id}>
|
<DropdownMenuItem key={org.id}>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={async () => {
|
||||||
if (currentOrg?.id === org.id) return;
|
if (currentOrg?.id === org.id) return;
|
||||||
|
|
||||||
if (org.authEnforced) {
|
if (org.authEnforced) {
|
||||||
// org has an org-level auth method enabled (e.g. SAML)
|
// org has an org-level auth method enabled (e.g. SAML)
|
||||||
// -> logout + redirect to SAML SSO
|
// -> logout + redirect to SAML SSO
|
||||||
logOutUser();
|
|
||||||
|
await logout.mutateAsync();
|
||||||
|
window.open(`/api/v1/sso/redirect/saml2/organizations/${org.slug}`);
|
||||||
|
window.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user