Skip to content
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

feat(auth): refactor auth + allow to configure auth methods by workspace #8604

Conversation

AMoreaux
Copy link
Contributor

No description provided.

Replaced the 'IS_SIGN_UP_DISABLED' flag with 'IS_MULTIWORKSPACE_ENABLED' to control workspace creation. This change allows for conditional workspace setup based on the new environment variable. Also updated related service, resolver, and entity files.
Updated the IS_MULTIWORKSPACE_ENABLED setting description to indicate support for multiple workspaces. This update clarifies that a web server capable of managing subdomain wildcards is required.
Updated the .env.example file to replace the IS_SIGN_UP_DISABLED variable with IS_MULTIWORKSPACE_ENABLED. Removed the IS_SIGN_UP_DISABLED property from environment-variables.ts as it is no longer needed.
…nabled

Removed isSignUpDisabledState and associated references, and replaced them with isMultiworkspaceEnabledState. Updated GraphQL queries and related components to reflect this change, and ensured multi-workspace functionality is enabled where applicable.
Corrected the casing of the `isMultiWorkspaceEnabled` variable in the NavigationDrawerHeader component. This ensures consistent naming conventions and avoids potential bugs related to variable misnaming.
Copy link

github-actions bot commented Nov 20, 2024

Warnings
⚠️ Changes were made to the environment variables, but not to the documentation - Please review your changes and check if a change needs to be documented!

TODOs/FIXMEs:

  • // TODO AMOREAUX: this logger is trigger twice and the second time the message is undefined for an unknown reason: packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts
  • // TODO AMOREAUX: change that with subdomains: packages/twenty-server/src/engine/core-modules/workspace/services/workspace.service.ts

Generated by 🚫 dangerJS against aa75a65

…t-auth-methods-by-workspace

# Conflicts:
#	packages/twenty-front/src/modules/auth/sign-in-up/components/SignInUpForm.tsx
#	packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts
Remove unused imports from SignInUpGlobalScopeForm.tsx to improve code readability and reduce clutter. This change simplifies the module by eliminating unnecessary dependencies.
Suppress eslint warnings for console.error in error handling. This ensures cleaner code and maintains log output for better debugging.
Correct the expected state in useAuth test to reflect the accurate status of authProviders. This includes setting 'google' and 'password' to true, and initializing 'sso' as an empty array.
@AMoreaux
Copy link
Contributor Author

Close for #8654

@AMoreaux AMoreaux closed this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant