nuxt-better-auth

Implement authentication and authorization for Nuxt.js applications with Better Auth.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/hipi/nuxt-nav-ai --skill nuxt-better-auth-hipi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nuxt-better-auth
Source: https://github.com/hipi/nuxt-nav-ai/tree/main/.agents/skills/nuxt-better-auth
Command: npx skills add https://github.com/hipi/nuxt-nav-ai --skill nuxt-better-auth-hipi

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 applications, handling user sessions, route protection, and integration with various authentication providers.

Core Features & Use Cases

  • User Authentication: Manages login, signup, and logout flows for users.
  • Route Protection: Secures specific application routes based on user authentication status and roles.
  • Server-Side Auth: Provides utilities for protecting API routes and accessing user sessions on the server.
  • Plugin Integration: Supports extensions like admin roles, two-factor authentication (2FA), and passkeys.
  • Use Case: Securely protect your /admin routes, ensuring only users with the 'admin' role can access them, while allowing any authenticated user to access /dashboard.

Quick Start

Use the nuxt-better-auth skill to protect the '/admin' route with an 'admin' role.

Frequently Asked Questions about nuxt-better-auth

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

FAQPage Schema
How do I protect specific routes in a Nuxt application based on user roles?

Secure specific Nuxt routes by applying route rules and page meta to verify user authentication status and roles. This restricts access to areas like /admin to authorized users only.

How does server-side authentication work for Nuxt API endpoints?

Server-side authentication for Nuxt API endpoints uses helpers like requireUserSession. This utility protects API routes by enforcing valid user sessions before granting access to server-side logic.

Can I add two-factor authentication and passkeys to my Nuxt auth setup?

Yes, you can add two-factor authentication and passkeys to your Nuxt auth setup. The implementation supports integration with Better Auth plugins to extend security features for user login flows.

What is the best way to manage user sessions in a Nuxt.js application?

Manage user sessions in a Nuxt.js application by utilizing the @onmax/nuxt-better-auth module. It handles login, signup, and logout flows while maintaining secure session states for authenticated users.

Does Nuxt better auth support role-based access control for dashboards?

Yes, Nuxt better auth supports role-based access control. You can secure routes ensuring only users with an 'admin' role access /admin, while any authenticated user accesses /dashboard.