## Problem When trying to signup on localhost:3001 with a new random email, users were getting an error message saying 'User already exists', even though they were new users. ## Root Cause The `signUpWithoutWorkspace` method in `sign-in-up.service.ts` had inverted logic when checking if a user exists. It was using `findUserByEmailOrThrow` which: - **Returns the user** if found - **Throws the provided error** if NOT found This caused the opposite behavior: - ❌ **New user (doesn't exist)**: Threw 'User already exists' error - ❌ **Existing user**: Continued to create duplicate user ## Solution Changed to use `findUserByEmail` and explicitly check if the user exists before throwing the appropriate error: ```typescript const existingUser = await this.userService.findUserByEmail(newUserParams.email); if (existingUser) { throw new AuthException( 'User already exist', AuthExceptionCode.USER_ALREADY_EXIST, { userFriendlyMessage: msg`User already exists` }, ); } ``` This matches the correct pattern already used in `signUpInWorkspace` (line 431-441 in auth.resolver.ts). ## Changes - Fixed inverted logic in `signUpWithoutWorkspace` method - Now correctly validates that user does NOT exist before creating new user - Matches the pattern used in `signUpInWorkspace` ## Testing The fix corrects the logic so that: - ✅ New users can sign up successfully - ✅ Existing users get the correct 'User already exists' error
The #1 Open-Source CRM
🌐 Website · 📚 Documentation · Roadmap ·
Discord ·
Figma
Installation
See:
🚀 Self-hosting
🖥️ Local Setup
Does the world need another CRM?
We built Twenty for three reasons:
CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.
A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.
We believe in Open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.
What You Can Do With Twenty
Please feel free to flag any specific needs you have by creating an issue.
Below are a few features we have implemented to date:
- Personalize layouts with filters, sort, group by, kanban and table views
- Customize your objects and fields
- Create and manage permissions with custom roles
- Automate workflow with triggers and actions
- Emails, calendar events, files, and more
Personalize layouts with filters, sort, group by, kanban and table views
Customize your objects and fields
Create and manage permissions with custom roles
Automate workflow with triggers and actions
Emails, calendar events, files, and more
Stack
- TypeScript
- Nx
- NestJS, with BullMQ, PostgreSQL, Redis
- React, with Recoil, Emotion and Lingui
Thanks
Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).
Join the Community
- Star the repo
- Subscribe to releases (watch -> custom -> releases)
- Follow us on Twitter or LinkedIn
- Join our Discord
- Improve translations on Crowdin
- Contributions are, of course, most welcome!





