What problem does it solve?
Nuxt applications often require robust authentication with both client and server capabilities, plus secure route protection and seamless user session management. This Skill provides a plug-and-play integration with Better Auth to accelerate secure user authentication in Nuxt 4+ projects.
Core Features & Use Cases
- Client-side composables like useUserSession(), server utilities, and route protection to manage authentication state across SSR and client contexts.
- Server-side helpers such as serverAuth(), getUserSession(), and requireUserSession() to enforce access control in API routes.
- NuxtHub integration for database-backed user and session management, and seamless plugin support for common security enhancements.
- Flexible configuration for client/server modes, OAuth providers, and advanced features (2FA, passkeys, multi-session) via Better Auth plugins.
- Use cases include protecting admin areas, implementing login flows, and persisting sessions across page navigation and SSR.
Quick Start
Install the module, configure server and client auth, and start protecting routes with route rules and useUserSession.