mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 07:27:58 +00:00
Merge pull request #4475 from Infisical/fix/googleSsoEnforcedIssueWithSaml
Fix Google SSO issue with SAML configs when SSO is enforced and not SAML
This commit is contained in:
@@ -88,7 +88,15 @@ export const SelectOrganizationSection = () => {
|
|||||||
// 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
|
||||||
let url = "";
|
let url = "";
|
||||||
if (organization.orgAuthMethod === AuthMethod.OIDC) {
|
if (organization.googleSsoAuthEnforced) {
|
||||||
|
if (authToken.authMethod !== AuthMethod.GOOGLE) {
|
||||||
|
url = `/api/v1/sso/redirect/google?org_slug=${organization.slug}`;
|
||||||
|
|
||||||
|
if (callbackPort) {
|
||||||
|
url += `&callback_port=${callbackPort}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (organization.orgAuthMethod === AuthMethod.OIDC) {
|
||||||
url = `/api/v1/sso/oidc/login?orgSlug=${organization.slug}${
|
url = `/api/v1/sso/oidc/login?orgSlug=${organization.slug}${
|
||||||
callbackPort ? `&callbackPort=${callbackPort}` : ""
|
callbackPort ? `&callbackPort=${callbackPort}` : ""
|
||||||
}`;
|
}`;
|
||||||
@@ -98,15 +106,6 @@ export const SelectOrganizationSection = () => {
|
|||||||
if (callbackPort) {
|
if (callbackPort) {
|
||||||
url += `?callback_port=${callbackPort}`;
|
url += `?callback_port=${callbackPort}`;
|
||||||
}
|
}
|
||||||
} else if (
|
|
||||||
organization.googleSsoAuthEnforced &&
|
|
||||||
authToken.authMethod !== AuthMethod.GOOGLE
|
|
||||||
) {
|
|
||||||
url = `/api/v1/sso/redirect/google?org_slug=${organization.slug}`;
|
|
||||||
|
|
||||||
if (callbackPort) {
|
|
||||||
url += `&callback_port=${callbackPort}`;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// we are conditionally checking if the url is set because it may not be set if google SSO is enforced, but the user is already logged in with google SSO
|
// we are conditionally checking if the url is set because it may not be set if google SSO is enforced, but the user is already logged in with google SSO
|
||||||
|
|||||||
+3
-2
@@ -204,9 +204,10 @@ export const OrgGeneralAuthSection = ({
|
|||||||
</OrgPermissionCan>
|
</OrgPermissionCan>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-sm text-mineshaft-300">
|
<p className="text-sm text-mineshaft-300">
|
||||||
Enforce users to authenticate via Google to access this organization.
|
Enforce users to authenticate via Google OAuth SSO to access this organization.
|
||||||
<br />
|
<br />
|
||||||
When this is enabled your organization members will only be able to login with Google.
|
When this is enabled your organization members will only be able to login with Google
|
||||||
|
SSO (not Google SAML).
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user