better-auth

Solid

Provides Better Auth integration patterns for NestJS backend and Next.js frontend with Drizzle ORM and PostgreSQL. Use when setting up Better Auth with NestJS backend, integrating Next.js App Router frontend, configuring Drizzle ORM schema, implementing social login (GitHub, Google), adding plugins (2FA, Organization, SSO, Magic Link, Passkey), implementing email/password authentication with session management, or creating protected routes and middleware.

API & Backend 263 stars 31 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
81
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Better Auth Integration Guide ## Overview Better Auth is a type-safe authentication framework for TypeScript supporting multiple providers, 2FA, SSO, organizations, and passkeys. This skill covers integration patterns for NestJS backend with Drizzle ORM + PostgreSQL and Next.js App Router frontend. ## When to Use - Setting up Better Auth with NestJS backend - Integrating Next.js App Router frontend - Configuring Drizzle ORM schema with PostgreSQL - Implementing social login (GitHub, Google, Facebook, Microsoft) - Adding MFA/2FA with TOTP, passkey passwordless auth, or magic links - Managing trusted devices and backup codes for account recovery - Building multi-tenant apps with organizations or SSO - Creating protected routes with session management ## Quick Start ### Installation ```bash # Backend (NestJS) npm install better-auth @auth/drizzle-adapter drizzle-orm pg npm install -D drizzle-kit # Frontend (Next.js) npm install better-auth ``` ### 4-Phase Setup 1. **Database**: Install Drizzle, configure schema, run migrations 2. **Backend**: Create Better Auth instance with NestJS module 3. **Frontend**: Configure auth client, create pages, add middleware 4. **Plugins**: Add 2FA, passkey, organizations as needed See `references/nestjs-setup.md` for complete backend setup, `references/plugins.md` for plugin configuration. ## Instructions ### Phase 1: Database Setup 1. **Install dependencies** ```bash npm install drizzle-orm pg @auth/drizzle-adapter better-a...

Details

Author
giuseppe-trisciuoglio
Repository
giuseppe-trisciuoglio/developer-kit
Created
7 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

API & Backend Listed

better-auth

Better Auth integration guide for TypeScript/JavaScript authentication. Covers server/client configuration, database adapters, session management, plugins, OAuth, and scaffolding auth from scratch. Use when setting up authentication with Better Auth, configuring auth.ts, adding OAuth providers, or creating sign-in/sign-up flows.

24 Updated 2 days ago
georgekhananaev
Web & Frontend Solid

better-auth

Skill for integrating Better Auth - comprehensive TypeScript authentication framework for Cloudflare D1, Next.js, Nuxt, and 15+ frameworks. Use when adding auth, encountering D1 adapter errors, or implementing OAuth/2FA/RBAC features.

162 Updated 2 weeks ago
secondsky
API & Backend Listed

better-auth-best-practices

Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables. Use when users mention Better Auth, betterauth, auth.ts, or need to set up TypeScript authentication with email/password, OAuth, or plugin configuration.

24 Updated 2 days ago
georgekhananaev
API & Backend Listed

better-auth-best-practices

Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables. Use when users mention Better Auth, betterauth, auth.ts, or need to set up TypeScript authentication with email/password, OAuth, or plugin configuration.

335 Updated today
aiskillstore
API & Backend Listed

060103-better-auth

Better Auth integration for Next.js — setup, API endpoints, client SDK, React Context provider, and Organization plugin for multi-tenant auth.

1 Updated yesterday
natuleadan