Components
Organization Switcher
A Better Auth organization switcher backed by the central Krakstack Auth client, with organization creation, editing, active organization switching, and organization API keys.
Install
Add this registry item to your app with shadcn.
bunx --bun shadcn@latest add https://krakstack.net/r/organization-switcher.jsonOverview
organization-switcher provides an organization-aware dropdown for apps using Krakstack Auth as the central identity provider. It uses centralAuthClient so the active organization, memberships, and organization API keys stay scoped to the central auth service rather than the app-local session.
Features
- Central Krakstack Auth organization list and active organization state
- Create organizations and auto-generate slugs
- Switch between organizations
- Edit the active organization's name and slug
- Manage organization-scoped API keys
- Configurable unauthenticated render slot
- Localized menu and form labels
Usage
import { OrganizationSwitcher } from "@/components/ui/organization-switcher";
<OrganizationSwitcher side="bottom" />Set VITE_KRAKSTACK_AUTH_URL to your central auth origin, for example http://localhost:3001. The central auth server must have Better Auth's organization and API-key plugins enabled.
Dependencies
Packages and shadcn components required by this registry item.
Dependencies
Registry Dependencies
Preview
Organization Switcher
This preview uses the central Krakstack Auth client for organization state.