Organization Selection
Multi-organization selection for users with multiple affiliations
Select Staff Organization
Used by the staff web GUI after authentication when user has multiple orgs:
Request
Response
Full token scoped to the chosen organization:
Select Organization (Generic)
Used by tests and the mobile app — resolves patient memberships first, then staff:
Request
Same response format as above. This endpoint auto-detects whether the user is staff or patient and returns appropriate claims.
Three Auth Paths
| Endpoint | Used By | Checks |
|---|---|---|
/select-staff-organization | Staff web GUI | Staff memberships only |
/select-organization | Tests + mobile | Patient memberships first, then staff |
Auto-login (in /authenticate) | Single-org users | Returns token directly |
All three paths return consistent roles[], privileges[], and JWT claims.