-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
review(): from PR #8656 #8870
review(): from PR #8656 #8870
Conversation
# Conflicts: # packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts # packages/twenty-server/src/engine/core-modules/domain-manager/service/domain-manager.service.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR implements significant changes to the authentication system, focusing on SSO integration, workspace-specific auth providers, and improved validation handling across both frontend and backend.
- Introduces new
SignInUpWorkspaceScopeFormEffect
component to handle automatic auth provider selection and form progression - Moves favicon handling from
WorkspaceProviderEffect
to new dedicatedPageFavicon
component for better separation of concerns - Refactors backend auth validation with new
WorkspaceAuthProvider
type andisAuthEnabledOrThrow
method - Renames validation methods for consistency (e.g.,
assertIsExist
toassertIsDefinedOrThrow
) and improves error handling - Contains a critical typo in method name
saveDefautWorkspaceIfUserHasAccessOrThrow
(missing 'l') across multiple files
38 file(s) reviewed, 16 comment(s)
Edit PR Review Bot Settings | Greptile
...ges/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx
Outdated
Show resolved
Hide resolved
const checkAuthProviders = useCallback(() => { | ||
if ( | ||
signInUpStep === SignInUpStep.Init && | ||
!authProviders.google && | ||
!authProviders.microsoft && | ||
!authProviders.sso | ||
) { | ||
return continueWithEmail(); | ||
} | ||
|
||
if (isDefined(email) && authProviders.password) { | ||
return continueWithCredentials(); | ||
} | ||
}, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: checkAuthProviders could be called with stale email value since email is not in dependency array
...ges/twenty-front/src/modules/auth/sign-in-up/components/SignInUpWorkspaceScopeFormEffect.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/auth/sign-in-up/hooks/useSignInUpForm.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/ui/utilities/page-favicon/PageFavicon.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/user/user.validate.ts
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/user/services/user.service.ts
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/workspace/workspace.type.ts
Outdated
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/workspace/workspace.validate.ts
Show resolved
Hide resolved
packages/twenty-server/src/engine/core-modules/workspace/workspace.validate.ts
Outdated
Show resolved
Hide resolved
@@ -0,0 +1 @@ | |||
export type WorkspaceAuthProvider = 'google' | 'microsoft' | 'password'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be in a types folder
Thanks @AMoreaux for your contribution! |
No description provided.