Skip to content

Task 4.3: Authentication Implementation #24

@scrollinondubs

Description

@scrollinondubs

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

  1. Customer - Book appointments, view services
  2. Staff - View own schedule, manage availability
  3. 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

Estimated Effort

12 hours

Priority

P0

Git Worktree

Can be developed in separate auth worktree after database is ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions