diff --git a/packages/twenty-server/src/core/auth/services/auth.service.ts b/packages/twenty-server/src/core/auth/services/auth.service.ts index 946bb6985..2b481a836 100644 --- a/packages/twenty-server/src/core/auth/services/auth.service.ts +++ b/packages/twenty-server/src/core/auth/services/auth.service.ts @@ -167,7 +167,13 @@ export class AuthService { defaultWorkspace: workspace, }); - return await this.userRepository.save(userToCreate); + const user = await this.userRepository.save(userToCreate); + + if (workspaceInviteHash) { + await this.userService.createWorkspaceMember(user); + } + + return user; } async verify(email: string): Promise {