feat: implement email-optional authentication
- Make email field optional in database schema - Update user creation to handle null emails - Enhance notification service to gracefully skip email for users without email addresses - Add validation in email service for null/empty emails - Create comprehensive documentation for Clerk configuration - Add test script for email-optional functionality - Update all user creation points (userService, eventController, reportController) Users can now sign up with just username and password. Email notifications are gracefully skipped for users without email addresses, while in-app notifications continue to work for all users. Closes: Email-optional authentication requirement
This commit is contained in:
@@ -9,7 +9,7 @@ datasource db {
|
||||
|
||||
model User {
|
||||
id String @id @default(dbgenerated("(uuid())")) @db.VarChar(36)
|
||||
email String @unique(map: "email") @db.VarChar(255)
|
||||
email String? @unique(map: "email") @db.VarChar(255)
|
||||
password_hash String? @db.VarChar(255)
|
||||
username String @unique(map: "username") @db.VarChar(100)
|
||||
createdAt DateTime? @default(now()) @map("created_at") @db.Timestamp(0)
|
||||
|
||||
Reference in New Issue
Block a user