Skip to main content

Authentication System

Overview

Cronozen uses JWT-based authentication with multi-tenant context. All services authenticate through a single SSO endpoint.

Auth Flow

Key Components

Tenant Resolution Priority

When a user logs in, the system determines their default tenant in this order:
  1. ADMIN — Admin always goes to admin context
  2. URL tenant — If accessing via specific tenant URL
  3. Last tenant — User’s most recent tenant
  4. Single — If user has only one membership
  5. Email match — Match by email domain
  6. Picker — Show tenant picker
  7. Pending — Pending membership flow
  8. Onboarding — New user onboarding

JWT Structure

Actor Family

Actors with the same email or phone are automatically linked as a family. This enables:
  • Center switching without re-login
  • Cross-center visibility for parents
  • Unified session across services