Authentication is table stakes. Authorization - who can do what within your app - is where the real complexity lives. Clerk Organizations v2 addresses this with a flexible permission system that goes beyond simple role-based access. You define custom roles with granular permissions (e.g., "can edit content" + "can view analytics" but not "can manage billing"), and Clerk enforces these at the middleware level.
The implementation is practical. Permissions are checked server-side in your Next.js middleware or API routes using a simple API: auth().has("org:content:edit"). This means permission checks are fast, do not require additional API calls, and work with server-side rendering. For client-side UI, Clerk provides React hooks that hide or show elements based on the current user's permissions without layout flicker.
Audit logs are the enterprise feature that growing startups eventually need and usually build poorly. Clerk's audit log captures every authentication event, role assignment, permission change, and organization membership modification with timestamps and actor identification. For B2B SaaS products, this is often a compliance requirement that would take weeks to build in-house. The free tier is generous enough for early-stage products, and the paid tiers scale predictably.
If you are building a B2B SaaS product and rolling your own authorization logic, evaluate Clerk Organizations v2 before writing more permission code.