Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(auth): check all SAML auth method variants in org selector guard

Igor Correa804462b0d117
diff --git a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx
index 46e0ae0144..5b1b0732cd 100644
--- a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx
+++ b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx
@@ -142,7 +142,14 @@ export const SelectOrganizationSection = () => {
callbackPort ? `&callbackPort=${callbackPort}` : ""
}`;
} else if (organization.orgAuthMethod === AuthMethod.SAML) {
- if (authToken.authMethod !== AuthMethod.SAML) {
+ const samlAuthMethods = [
+ AuthMethod.SAML,
+ AuthMethod.OKTA_SAML,
+ AuthMethod.AZURE_SAML,
+ AuthMethod.JUMPCLOUD_SAML,
+ AuthMethod.KEYCLOAK_SAML
+ ];
+ if (!samlAuthMethods.includes(authToken.authMethod)) {
url = `/api/v1/sso/redirect/saml2/organizations/${organization.slug}`;
if (callbackPort) {
url += `?callback_port=${callbackPort}`;