feat: implement user registration functionality
- Created registerUser server action with email/password validation - Implemented password hashing with bcrypt (10 rounds) - Added email uniqueness check to prevent duplicate registrations - Created session after successful registration using NextAuth - Added comprehensive validation for email format and password length (min 8 chars) - Added email and password validation utilities to lib/validation.ts - Removed PrismaAdapter from auth.ts (using JWT sessions only) - Added vitest testing framework and configuration - Created comprehensive unit tests for registration functionality - All tests passing (6/6) Requirements covered: 1.1, 1.2, 1.3, 1.4, 1.5
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- Set up environment variables for auth secrets
|
||||
- _Requirements: 1.1, 2.1_
|
||||
|
||||
- [ ] 2. Update database schema for multi-user support
|
||||
- [x] 2. Update database schema for multi-user support
|
||||
- Add User model with email, passwordHash, and name fields
|
||||
- Add Collaborator model for list sharing
|
||||
- Add Invitation model for sharing invitations
|
||||
@@ -26,7 +26,7 @@
|
||||
- **Property 3: Password hashing on registration**
|
||||
- **Validates: Requirements 1.3**
|
||||
|
||||
- [ ] 3. Implement user registration functionality
|
||||
- [x] 3. Implement user registration functionality
|
||||
- Create registration server action with email/password validation
|
||||
- Implement password hashing with bcrypt
|
||||
- Add email uniqueness check
|
||||
|
||||
Reference in New Issue
Block a user