Skills / Engineering / Better Auth

Better Auth

Add framework-agnostic authentication with Better Auth. Covers email/password, social OAuth, sessions, two-factor, organizations and roles, plugins, and type-safe integration with Drizzle, Prisma, and modern TypeScript backends.

This skill helps you wire authentication with Better Auth, the TypeScript-first auth framework. It configures email/password and social sign-in, manages sessions and cookies, adds two-factor and passkeys, models organizations, roles and permissions, extends behavior with plugins, and connects to Drizzle or Prisma adapters with end-to-end type safety.

better-auth authentication oauth sessions typescript

When to use

Use when adding authentication with Better Auth — email/password, social OAuth, sessions, 2FA/passkeys, organizations and roles, plugins, or database adapter setup with Drizzle or Prisma.

Examples

Social sign-in

Add GitHub + Google OAuth

Set up Better Auth in my Next.js app with GitHub and Google social providers, a Drizzle adapter, and a session-protected dashboard route

Orgs and roles

Multi-tenant access control

Enable the Better Auth organization plugin so users can create teams, invite members, and assign owner/admin/member roles
Added to wishlist