-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add accountName field to User model and make email nullable #2067
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
Conversation
17f2b73 to
344730d
Compare
|
Deployment Status: ✅ Success |
dc74c78 to
b63ec87
Compare
|
Deployment Status: ✅ Success |
1 similar comment
|
Deployment Status: ✅ Success |
30c9658 to
b042f5c
Compare
|
Deployment Status: ✅ Success |
3 similar comments
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
|
Deployment Status: ✅ Success |
5831ceb to
606cec7
Compare
|
Deployment Status: ✅ Success |
606cec7 to
6a88471
Compare
|
Deployment Status: ✅ Success |
fcd7b60 to
155ecfa
Compare
|
Deployment Status: ✅ Success |
1 similar comment
|
Deployment Status: ✅ Success |
80abfda to
782a510
Compare
|
Deployment Status: ✅ Success |
782a510 to
457b6ca
Compare
457b6ca to
9e349e9
Compare
|
Deployment Status: ✅ Success |
1 similar comment
|
Deployment Status: ✅ Success |
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.
Pull Request Overview
This PR adds account name functionality to the user system, allowing users to register and sign in with an account name as an alternative to email addresses. This includes database schema changes, API schema updates, backend validation logic, frontend UI changes, and internationalization updates.
- Add
accountNamefield to the User model with unique constraint and make email nullable - Implement account name-based registration and authentication with validation (min 3, max 30 chars, no '@' symbol)
- Add admin setting to enable/disable account name registration
- Update user creation flow to auto-generate unique account names when not provided
Reviewed Changes
Copilot reviewed 76 out of 76 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/db-main-prisma/prisma/template.prisma | Added accountName field (unique, nullable) and made email nullable in User model |
| packages/db-main-prisma/prisma//migrations/ | Database migration scripts to add account_name column with data migration |
| packages/openapi/src/auth/*.ts | Updated schemas for signup, signin, and user info to include accountName field |
| packages/core/src/utils/id-generator.ts | Added generateAccountName() function for creating unique account identifiers |
| apps/nestjs-backend/src/features/user/user.service.ts | Implemented account name validation, lookup, and auto-generation logic |
| apps/nestjs-backend/src/features/auth/local-auth/local-auth.service.ts | Updated signup/signin flows to support account name authentication |
| apps/nextjs-app/src/features/auth/components/SignForm.tsx | Added UI for account name input during registration and login |
| packages/common-i18n/src/locales/*/common.json | Added translations for account name labels across all supported languages |
| apps/nestjs-backend/test/auth.e2e-spec.ts | Added comprehensive test coverage for account name registration and signin |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/nestjs-backend/src/features/auth/local-auth/local-auth.service.ts
Outdated
Show resolved
Hide resolved
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
…ccount name generation logic
|
Deployment Status: ✅ Success |
🧹 Preview Environment Cleanup
|
No description provided.