Avnology ID
Components

OrganizationSwitcher

Drop-down to switch the active organization for the signed-in user.

<OrganizationSwitcher />

Exposes the org-switching UX. When a user belongs to multiple orgs, shows the active one plus a menu listing the others and a "Create organization" CTA.

Import

Exported today as OrgSwitcher. Aliased to OrganizationSwitcher in v1.1.

Usage

import { OrgSwitcher } 









Props

PropTypeDefaultDescription
onChange(org: Organization) => voidundefinedFires after switch
hideCreateCTAbooleanfalseHide "Create organization"
appearance{ width?: number }undefinedVisual overrides

What "switch" does

The switcher calls useSetActiveOrganization() under the hood, which:

  1. Sets the X-Avnology-Org cookie on <Domain id="app"/>.
  2. All subsequent SDK calls scope to the new org automatically.
  3. Emits a session.organization_switched audit event.

Switching does not re-authenticate -- the session stays the same.