nuxt-better-auth

Integrates Nuxt with Better Auth for server and client authentication flows.

45|3|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/Charles5277/nuxt-supabase-starter --skill nuxt-better-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nuxt-better-auth
Source: https://github.com/Charles5277/nuxt-supabase-starter/tree/main/.claude/skills/nuxt-better-auth
Command: npx skills add https://github.com/Charles5277/nuxt-supabase-starter --skill nuxt-better-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about nuxt-better-auth

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

FAQPage Schema
How do I set up authentication in a Nuxt 4 application?

To set up Nuxt authentication, you can integrate Better Auth to configure server and client auth flows, manage user sessions, and protect routes using built-in composables like useUserSession().

How does route protection work with Better Auth in Nuxt?

Route protection in Nuxt with Better Auth is enforced using server-side helpers like requireUserSession() to secure API routes and route rules to restrict page access based on the user session state.

Can I use database-backed sessions for Nuxt authentication?

Yes, you can achieve database-backed user and session management in Nuxt by leveraging the Better Auth integration with NuxtHub to persist session state securely across your application.

Does Better Auth support advanced security features like 2FA in Nuxt?

Yes, Better Auth supports flexible configuration for advanced security features in Nuxt, including two-factor authentication, passkeys, multi-session management, and OAuth providers via plugins.

How do I manage user sessions across SSR and client contexts in Nuxt?

You can manage user sessions across SSR and client contexts in Nuxt using client-side composables like useUserSession() and server-side utilities such as getUserSession() provided by the Better Auth integration.

What is the best way to protect an admin area in a Nuxt app?

The best way to protect a Nuxt admin area is by applying server-side access control with requireUserSession() and defining route rules to enforce authentication before rendering protected pages.