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:- ADMIN — Admin always goes to admin context
- URL tenant — If accessing via specific tenant URL
- Last tenant — User’s most recent tenant
- Single — If user has only one membership
- Email match — Match by email domain
- Picker — Show tenant picker
- Pending — Pending membership flow
- 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