Skip to content

fix(auth): handle availableWorkspacesCount correctly when listing wor… #12746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 20, 2025

Conversation

AMoreaux
Copy link
Contributor

…kspaces

@AMoreaux AMoreaux requested a review from ijreilly June 19, 2025 16:19
@AMoreaux AMoreaux self-assigned this Jun 19, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Fixed workspace selection logic in social SSO authentication to properly handle single workspace scenarios.

  • Modified condition in packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts from availableWorkspacesCount !== 0 to availableWorkspacesCount > 1 to avoid unnecessary workspace selection screen for users with exactly one workspace
  • Aligns with workspace entity structure where each user can be associated with multiple workspaces through one-to-many relationship

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Jun 19, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:19465

This environment will automatically shut down when the PR is closed or after 5 hours.

@AMoreaux AMoreaux merged commit 5b81e9e into main Jun 20, 2025
42 checks passed
@AMoreaux AMoreaux deleted the fix/social-sso-auth-with-one-workspace-on-default branch June 20, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants