
Better Auth
Type-safe Better Auth integration guide for NestJS, Next.js App Router, and Drizzle ORM with PostgreSQL.
- CCM score
- 49 of 100
- skills.sh installs
- 3.8K
- GitHub stars
- 372
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers a four-phase setup: Drizzle database, NestJS backend, Next.js frontend, then plugins
- Includes Drizzle config, Better Auth instance, NestJS auth controller, and
lib/auth.tsclient snippets with checkpoints after each phase - Provides examples for Server Component sessions, 2FA TOTP with trusted devices, and passkey registration and login
- Designed for developers adding social login, MFA, organizations, SSO, or protected routes to a TypeScript stack
Install
$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill better-auth -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
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
Details
- Repository
- github.com/giuseppe-trisciuoglio/developer-kit
- Categories
- Backend & APIs, Frontend & UI Code
- First seen
- May 16, 2026
More from giuseppe-trisciuoglio/developer-kit
All 95- Aws Lambda Java Integration3.7K
- Aws Lambda Php Integration3.7K
- Spring Boot Project Creator3.7K
- Docs Updater3.7K
- Notebooklm3.7K
- Github Issue Workflow3.7K
- Dynamodb Toolbox Patterns3.7K
- Memory Md Management3.7K
- Graalvm Native Image3.7K
- Adr Drafting3.6K
- Gemini3.6K
- Copilot Cli3.6K
- Codex3.6K
- Wiremock Standalone Docker3.6K
- Aws Cdk3.5K
- Learn3.5K
- Qwen Coder3.5K
- Bug Fix Brief3.2K
- Shadcn Ui22.8K
- Tailwind Css Patterns18.1K
- Drizzle Orm Patterns5.9K
- Nextjs Performance5.1K
- Unit Test Bean Validation5.1K
- React Patterns5K
Similar to Better Auth
More Backend & APIs
nextauth-authenticationmindrally/skills1.2K installsSetup guide for NextAuth.js v5 in Next.js covering providers, JWT and database sessions, and route protection.
nextjs-authenticationgiuseppe-trisciuoglio/developer-kit4K installsComplete Auth.js 5 setup for Next.js App Router, covering OAuth, route protection, and role-based access.
nestjsgiuseppe-trisciuoglio/developer-kit4.5K installsFramework scaffolding for NestJS servers paired with Drizzle ORM, covering REST, GraphQL, auth, and migrations.
create-authbetter-auth/skills29.3K installsInteractive scaffolding guide that plans and implements Better Auth in TypeScript/JavaScript apps before writing any code.
neon-authneondatabase/ai-rules266 installsSets up Neon Auth in Next.js, React SPA, or Node.js projects with auth routes and UI components.
auth-patternsdavepoon/buildwithclaude183 installsReference guide for authentication in Next.js covering NextAuth.js (Auth.js) setup, middleware-based route protection, and session handling.