Skip to content

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

fix(auth): skip OIDC re-auth redirect when user is already authenticated via OIDC

Igor Correaabfe5db029a6
diff --git a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx
index 0dca86010a..967b59e1de 100644
--- a/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx
+++ b/frontend/src/pages/auth/SelectOrgPage/SelectOrgSection.tsx
@@ -127,9 +127,11 @@ export const SelectOrganizationSection = () => {
}
}
} else if (organization.orgAuthMethod === AuthMethod.OIDC) {
- url = `/api/v1/sso/oidc/login?orgSlug=${organization.slug}${
- callbackPort ? `&callbackPort=${callbackPort}` : ""
- }`;
+ if (authToken.authMethod !== AuthMethod.OIDC) {
+ url = `/api/v1/sso/oidc/login?orgSlug=${organization.slug}${
+ callbackPort ? `&callbackPort=${callbackPort}` : ""
+ }`;
+ }
} else if (organization.orgAuthMethod === AuthMethod.SAML) {
if (
!SAML_AUTH_METHODS.includes(authToken.authMethod as (typeof SAML_AUTH_METHODS)[number])