What problem does it solve?
Provides clear, production-minded Nuxt 3 authentication patterns using @clerk/nuxt so teams can reliably protect pages, secure Nitro server API routes, and implement SSR-safe auth without guesswork.
Core Features & Use Cases
- Auto-registered auth route protection using the built-in auth middleware and definePageMeta for pages.
- Server API protection patterns that use event.context.auth or clerkClient to enforce authentication and return appropriate 401/403 responses.
- Client composables (useAuth, useUser, useClerk) auto-imported for component-level reactive state, SSR-safe hydration advice, and organization-scoped flows such as org switching.
- Practical guidance for common tasks: protecting dashboard pages, creating authenticated Nitro routes, building custom sign-in pages, and avoiding hydration mismatches.
Quick Start
Install and enable @clerk/nuxt, set the NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY and NUXT_CLERK_SECRET_KEY environment variables, add modules: ['@clerk/nuxt'] to nuxt.config.ts, and protect your /dashboard page by adding definePageMeta({ middleware: 'auth' }).