We use Clerk to handle authentication, user and organization management.
auth
package. By default, this package is a wrapper around Clerk which provides a complete authentication and user management solution that integrates seamlessly with Next.js applications.
Enable organizations
in your Clerk project settings to use the organization management features.@repo/auth
package exposes an AuthProvider
, however you don’t need to use this directly. The DesignSystemProvider
includes all relevant providers and higher-order components.
From here, you can use all the pre-built components and hooks provided by Clerk. To demonstrate this, we’ve added the <OrganizationSwitcher>
and <UserButton>
components to the sidebar, as well as built out the Sign In and Sign Up pages.
POST /webhooks/clerk
route in the api
app. Make sure you enable the webhook events you need in your Clerk project settings.