What problem does it solve?
This skill provides clear patterns and operational guidance to add organization-based multi-tenancy, role-based access control, verified domains, and enterprise SSO to B2B SaaS applications using Clerk, reducing custom auth complexity and security mistakes.
Core Features & Use Cases
- Organization management: Create and manage organizations, cap seats, and scope application data by organization.
- Org switching UI: Add an OrganizationSwitcher so users can select or create the active organization and view org-scoped dashboards.
- Role-based access control: Define roles and permissions, check them server-side, and protect routes or UI by role or permission.
- Member invitations & management: Send and revoke invitations, list pending invites, and manage memberships programmatically.
- Enterprise SSO & domain verification: Configure SAML/OIDC per organization, verify domains for auto-join, and inspect enterprise account data on sign-in.
- Operational gotchas: Guidance on billing-gated permissions, metadata updates versus replaces, and session behaviors for personal-account-disabled flows.
Quick Start
Use clerk-orgs to add organization switching, protect org-scoped routes with server-side auth checks, and enable role-based permissions and invitations for your Next.js app.