Overview
Configure Features
Components
Deploy
<CreateOrganization /> Create an organization with a slug, optional logo upload, redirect handling, and Convex-backed persistence. Auth auth Components / Organization Components / Create Organization auth
<CreateOrganization />

<CreateOrganization /> creates a new organization in Convex Better Auth. It handles name and slug input, optional logo upload, loading states, success callbacks, and redirect behavior after creation.
It is used inside <OrganizationSwitcher />, but you can also render it on a dedicated onboarding or workspace creation page.
Quick start
src/routes/organization/create/+page.svelte
src/app/organization/create/page.tsx
What it does
- Creates the organization through the Convex
createOrganizationmutation. - Generates a slug from the organization name while still allowing manual edits.
- Uploads and crops logos before saving them to Convex storage.
- Shows unauthenticated and loading states instead of rendering a broken form.
- Redirects after creation when
redirectToor aredirectToquery param is present. - Calls success callbacks so dialogs can close and parent UI can refresh.
Props
onSuccessfulCreate– called after the organization is created. Useful for closing a dialog.redirectTo– optional destination after creation. If omitted, the component also checks the currentredirectToquery param.
Redirect behavior
For onboarding flows, use /active-organization as a stable destination. After the organization is active, the route resolves to the current organization’s slug.
If the user creates an organization while already on an organization-scoped route, the component can update the URL so the route stays in the active organization context.
Related components
<OrganizationSwitcher />– includes this form in its create organization dialog.<OrganizationProfile />– manages an existing organization.<OrganizationProfileHost />– mounts the organization settings dialog.