Nuxt Better Auth is a Nuxt 4 module that wraps Better Auth with Nuxt-native configuration, route protection, SSR-safe session access, and optional NuxtHub schema generation.
Start here
Use the docs in this order if you are setting up the module for the first time:
You should finish that path with a working /api/auth/* backend, a client config, and a login flow that can read session state through useUserSession().
Choose the right setup
| If you want to... | Start here |
|---|---|
| Get a database-backed setup running quickly | NuxtHub |
| Plug Better Auth into your own database stack | Custom database |
| Reuse an external Better Auth server | External auth backend |
| Avoid a database and accept stateless session tradeoffs | Database-less mode |
Migrate from nuxt-auth-utils | Migration guide |
What the module adds on top of Better Auth
server/auth.config.tsandapp/auth.config.tshelpers- auto-imported client and server auth utilities
- route protection through
routeRulesand page meta - SSR-aware session hydration
- typed
AuthUserandAuthSessioninference from your config - optional NuxtHub database and schema integration