nuxt-better-auth

Configure secure authentication and authorization in Nuxt 4+ applications.

1|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/Kurrawong/prez-lite --skill nuxt-better-auth-kurrawong
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nuxt-better-auth
Source: https://github.com/Kurrawong/prez-lite/tree/main/.claude/skills/nuxt-better-auth
Command: npx skills add https://github.com/Kurrawong/prez-lite --skill nuxt-better-auth-kurrawong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the implementation of secure authentication and authorization in Nuxt 4+ applications, handling user sessions, route protection, and integration with various auth providers.

Core Features & Use Cases

  • User Session Management: Provides composables like useUserSession for accessing user data and authentication status.
  • Route Protection: Enables protection of client and server routes using routeRules and middleware based on authentication status or user roles.
  • Server-Side Auth Helpers: Offers utilities like requireUserSession to enforce authentication on API routes.
  • Plugin Integration: Supports Better Auth plugins for features like admin roles, two-factor authentication, and passkeys.
  • Use Case: Securely build a dashboard for your Nuxt application where only authenticated users with an 'admin' role can access specific sections, while guest users are redirected to a login page.

Quick Start

Install the module and configure your server and client authentication settings in nuxt.config.ts and server/auth.config.ts.

Frequently Asked Questions about nuxt-better-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement secure authentication and route protection in a Nuxt 4 application?▼

Implement secure authentication in Nuxt 4 by using the @onmax/nuxt-better-auth module to manage user sessions and protect client and server routes via middleware and routeRules.

How does server-side route protection enforce user authentication for API routes?▼

Server-side route protection enforces authentication using the requireUserSession utility, which validates user sessions on API routes and restricts access to authenticated users only.

Can I use Better Auth plugins for two-factor authentication and passkeys in Nuxt?▼

Yes, you can integrate Better Auth plugins in Nuxt to enable advanced security features like two-factor authentication, passkeys, and admin role management.

Does Nuxt session management support persistent database storage?▼

Yes, Nuxt session management supports persistent storage through optional NuxtHub database integration, accommodating both local and external authentication backends.

How do I restrict dashboard access to specific user roles in Nuxt?▼

Restrict dashboard access by applying route protection middleware based on user roles, redirecting unauthenticated guest users to a login page while blocking unauthorized roles.