Authentication & Role-Based Access

Care Circle uses JWT-based authentication with role-based access control. Supported roles: Coordinator, Caregiver, Family Member.

API Endpoints

  • POST /api/auth/login — Authenticate and receive JWT
  • GET /api/auth/me — Fetch current user

Role Middleware

  • requireAuth — Require valid JWT on protected routes
  • requireRole — Enforce role-based access (Coordinator, Caregiver, Family)
  • auditMiddleware — Log every action with before/after snapshots

Try It

The backend demo returns a placeholder token for any credentials.