The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
refactor(auth): update SSO provider selection logic (#9975)
Antoine Moreauxeb0762dc5821
diff --git a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsxindex 6d3b0239c0a..8811127f994 100644--- a/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx+++ b/packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx@@ -47,15 +47,15 @@ export const SignInUpWorkspaceScopeFormEffect = () => {return;}- if (workspaceAuthProviders.sso.length > 1) {- return setSignInUpStep(SignInUpStep.SSOIdentityProviderSelection);- }-const hasOnlySSOProvidersEnabled =!workspaceAuthProviders.google &&!workspaceAuthProviders.microsoft &&!workspaceAuthProviders.password;+ if (hasOnlySSOProvidersEnabled && workspaceAuthProviders.sso.length > 1) {+ return setSignInUpStep(SignInUpStep.SSOIdentityProviderSelection);+ }+if (hasOnlySSOProvidersEnabled && workspaceAuthProviders.sso.length === 1) {redirectToSSOLoginPage(workspaceAuthProviders.sso[0].id);}