nuxt-better-auth

Integrate Better Auth authentication into Nuxt 4+ applications.

Updated Jan 6, 2026
One-click install
npx skills add https://github.com/vito1317/security-one-waf-website --skill nuxt-better-auth-vito1317
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nuxt-better-auth
Source: https://github.com/vito1317/security-one-waf-website/tree/main/.tessl/tiles/onmax/nuxt-skills/skills/nuxt-better-auth
Command: npx skills add https://github.com/vito1317/security-one-waf-website --skill nuxt-better-auth-vito1317

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Nuxt applications often struggle with implementing consistent authentication flows, server-side access control, and session management across client and server boundaries. This skill provides a cohesive integration with Better Auth for Nuxt 4+ apps, exposing a client composable, server helpers, and route protection patterns.

Core Features & Use Cases

  • useUserSession composable for client-side auth state and actions
  • serverAuth and getUserSession helpers for server-side auth checks
  • route protection via routeRules and definePageMeta with plugin support
  • NuxtHub integration for database-backed sessions and extensible plugin ecosystem

Use cases include building login flows, protecting admin routes, securing API routes, and extending with Better Auth plugins.

Quick Start

Install the module in nuxt.config.ts, configure server and client authentication, and begin protecting routes with routeRules and definePageMeta.

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 authentication in Nuxt 4 using Better Auth?

Implement Nuxt authentication with Better Auth by installing the module in nuxt.config.ts, configuring serverAuth and client plugins, and using the useUserSession composable to manage login flows.

How does session management work across server and client in Nuxt?

Session management in Nuxt works by using the useUserSession composable on the client side and getUserSession or requireUserSession server helpers to secure API routes.

What is the best way to protect routes in a Nuxt application?

Protect routes in Nuxt by applying route protection patterns via routeRules and definePageMeta, supported by integrated client and server plugins.

Can I use Better Auth plugins with NuxtHub for database-backed sessions?

Yes, you can use Better Auth plugins with NuxtHub. The integration supports database-backed sessions and an extensible plugin ecosystem for Nuxt 4+ applications.

How do I secure API routes in Nuxt with server-side access control?

Secure API routes in Nuxt by using server-side helpers like requireUserSession to enforce access control and manage user sessions within your server routes.