-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Description
Integrate NextAuth.js v5 with email/OAuth providers and configure user roles (admin, staff, customer).
Epic
Part of Epic 4: Technical Foundation (#21)
Technical Details
- Auth Library: NextAuth.js v5
- Database Adapter: PostgreSQL adapter for NextAuth
- Providers: Email authentication, OAuth (Google optional)
- Authorization: Role-based access control (RBAC)
- Session: Server-side session management
- Routes:
/api/auth/*for NextAuth endpoints
User Roles
- Customer - Book appointments, view services
- Staff - View own schedule, manage availability
- Admin - Full access to all features
Acceptance Criteria
- NextAuth.js v5 configured with PostgreSQL adapter
- Email authentication working
- OAuth providers configured (Google optional)
- Role-based access control (RBAC) implemented
- Session management configured
- Protected routes working (admin, staff areas)
- Login/logout flows tested
Dependencies
- Depends on: Task 4.2: Database Schema Design & Setup (Task 4.2: Database Schema Design & Setup #23)
Estimated Effort
12 hours
Priority
P0
Git Worktree
Can be developed in separate auth worktree after database is ready.
Reactions are currently unavailable