
Better Auth
This walks you through integrating Better Auth (a TypeScript authentication framework) with a NestJS backend and Next.js frontend, using Drizzle ORM and PostgreSQL. You get step-by-step setup for email/password auth, social logins, and plugins like 2FA, passkeys, magic links, and organizations. It's structured in four phases: database schema and migrations, backend configuration with auth handlers, frontend client setup with middleware, then adding advanced features. The checkpoints after each phase are helpful for catching issues early. Good fit if you're building a production app that needs modern auth patterns beyond basic JWT tokens, especially if you want passwordless options or multi-tenant support without rolling everything yourself.
- skills.sh installs
- 3.7K
- GitHub stars
- 369
- last updated
- Aug 21, 2026
Install
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill better-auth --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
# 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
Sponsors
Details
- Repository
- github.com/giuseppe-trisciuoglio/developer-kit
- Categories
- Frontend Development, Backend & APIs, Security, Git & Pull Requests, Databases
- First seen
- May 16, 2026
More from giuseppe-trisciuoglio/developer-kit
All 102- Aws Lambda Java Integration3.7K
- Aws Lambda Php Integration3.7K
- Spring Boot Project Creator3.7K
- Docs Updater3.7K
- Notebooklm3.7K
- Github Issue Workflow3.6K
- Dynamodb Toolbox Patterns3.6K
- Memory Md Management3.6K
- Graalvm Native Image3.6K
- Adr Drafting3.6K
- Gemini3.6K
- Copilot Cli3.6K
- Codex3.5K
- Wiremock Standalone Docker3.5K
- Aws Cdk3.5K
- Learn3.5K
- Qwen Coder3.4K
- Bug Fix Brief3.1K
- Knowledge Graph1.9K
- Specs Code Cleanup1.8K
- Ralph Loop1.7K
- Create Pr From Spec1.5K
- Constitution1.4K
- Task Quality Kpi532