better-auth

Configure Better Auth for TypeScript apps with database adapters and plugins.

Updated Jan 20, 2026
One-click install
npx skills add https://github.com/lukebaze/forex-rebate-bot --skill better-auth-lukebaze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/lukebaze/forex-rebate-bot/tree/main/.opencode/skill/better-auth
Command: npx skills add https://github.com/lukebaze/forex-rebate-bot --skill better-auth-lukebaze

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Better Auth unifies and simplifies authentication and authorization for TypeScript apps, reducing boilerplate and potential security gaps.

Core Features & Use Cases

  • Email/password authentication with optional verification and password reset
  • OAuth providers with multi-tenant support, session management, and RBAC
  • Advanced features with plugins for 2FA/MFA, passkeys/WebAuthn, magic links, and organizations
  • Framework-agnostic client/server integration across Next.js, Nuxt, SvelteKit, Express, etc.

Quick Start

Install the Better Auth package, configure your environment, initialize the auth instance, and mount the API handler to start securing your app.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I add authentication to a TypeScript app using Better Auth?

To add authentication to a TypeScript app, install Better Auth, configure a database adapter via Drizzle, Prisma, or Kysely, initialize the auth instance, and mount the API handler to start securing your application.

Can I use OAuth and passkeys for authentication in a server-rendered TypeScript app?

Yes, OAuth and passkeys are supported in server-rendered TypeScript apps. Better Auth provides optional plugins for OAuth providers, WebAuthn passkeys, 2FA, and magic links across various frameworks.

What is the best way to handle multi-tenant authorization and RBAC in TypeScript?

The best way to handle multi-tenant authorization and RBAC in TypeScript is using Better Auth, which unifies authorization logic with session management and organization plugins to reduce boilerplate and security gaps.

Does Better Auth work with client-side SPAs and API backends?

Yes, Better Auth works with client-side SPAs and API backends. It offers framework-agnostic client and server integration across platforms like Next.js, Nuxt, SvelteKit, and Express.

Do I need a specific database adapter to set up sessions with Better Auth?

Yes, you need a database adapter to set up sessions. Better Auth requires configuring a database adapter via Drizzle, Prisma, or Kysely to manage authentication data and user sessions.