All skills
onmax avatar

/nuxt-better-auth

@e44f20d

Guides authentication in Nuxt apps using @nuxtjs/better-auth. Use when installing or configuring the module, using its client or server APIs, protecting routes, refreshing sessions, or integrating Better Auth plugins.

  • 9 files
  • 19.9 KB
  • MIT
  • Updated last week
  • GitHub

Use this Skill: https://skilld.dev/gh/onmax/claude-config/nuxt-better-auth

This session only. Nothing lands on disk.

referencesdatabase.md

≈326 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Database integration

Fastest database-backed path

Use NuxtHub.

export default defineNuxtConfig({
  modules: ['@nuxthub/core', '@nuxtjs/better-auth'],
  hub: {
    db: 'sqlite',
  },
})

What the module does with NuxtHub

  • reads server/auth.config.ts
  • generates auth tables from enabled Better Auth features
  • exposes generated schema through #auth/schema
  • supports custom atomic secondary storage for session lookup caching

Secondary storage

export default defineNuxtConfig({
  hub: { db: 'sqlite' },
  auth: {
    hubSecondaryStorage: 'custom',
  },
})

Important:

  • NuxtHub KV cannot implement Better Auth 1.7's atomic getAndDelete and increment operations, so hubSecondaryStorage: true logs a setup warning and continues without module-provided secondary storage. Sessions use the configured database when one exists. Track native support in nuxt-hub/core#927
  • hubSecondaryStorage: 'custom' means you provide an atomic secondaryStorage, such as Redis or Upstash
  • use DB-only reads if you prefer stricter read-after-write consistency

Non-NuxtHub setups

If you are not using NuxtHub, configure the Better Auth adapter yourself in server/auth.config.ts and manage schema generation separately.

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at e44f20d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 8 hours ago.

Activeupdated last week

README badge

README badge for onmax/claude-config/nuxt-better-auth