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.

referencestypes.md

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

TypeScript types

Primary imports

import type {
  AuthUser,
  AuthSession,
  AuthMeta,
  AuthRouteRules,
  RequireSessionOptions,
  AuthSocialProviderId,
} from '#nuxt-better-auth'

Key guarantees

  • AuthUser and AuthSession are inferred from your Better Auth config.
  • plugin fields flow into useUserSession(), getUserSession(), getRequestSession(), requireUserSession(), and auth route matching.
  • AuthSocialProviderId is inferred from configured social providers.

Manual augmentation

Only add manual module augmentation if inference is not enough or you need to declare project-specific fields in advance.

import '#nuxt-better-auth'

declare module '#nuxt-better-auth' {
  interface AuthUser {
    customField?: string
  }
}

Type-safe user matching

await requireUserSession(event, {
  user: { role: 'admin' },
})

The same user matcher shape works in route rules and page meta.

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 9 hours ago.

Activeupdated last week

README badge

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