nuxt-x-auth-local
Self-hosted JWT/Session auth layer for Nuxt.
nuxt-x-auth-local
Self-hosted JWT authentication layer for Nuxt. Pairs with @xenterprises/fastify-xauth-local.
Installation
npm install @xenterprises/nuxt-x-auth-local
Components
| Component | Description |
|---|---|
<XAuthLocalLogin /> | Email + password login |
<XAuthLocalSignup /> | Registration form |
<XAuthLocalForgotPassword /> | Password reset |
Composable
const { user, token, signIn, signOut, isAuthenticated, hasRole } = useXAuthLocal()
AI Context
package: "@xenterprises/nuxt-x-auth-local"
backend-pair: "@xenterprises/fastify-xauth-local"
use-when: Self-hosted auth without external provider, simple JWT-based auth
storage: token in httpOnly cookie or localStorage (configurable)
composable: useXAuthLocal() → { user, signIn, signOut, hasRole }
