better-auth

Set up Better Auth authentication for NestJS and Next.js with Drizzle ORM and PostgreSQL.

7|Updated Apr 25, 2025
One-click install
npx skills add https://github.com/ilyvsc/ado.fan --skill better-auth-ilyvsc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth
Source: https://github.com/ilyvsc/ado.fan/tree/main/.claude/skills/better-auth
Command: npx skills add https://github.com/ilyvsc/ado.fan --skill better-auth-ilyvsc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires better-auth, drizzle-orm, pg, better-auth-drizzle-adapter, drizzle-kit, better-auth-passkey, better-auth-organization, better-auth-sso, better-auth-magic-link, better-auth-email-verification, better-auth-email, better-auth-phone-verification, better-auth-anonymous-user, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the process of setting up authentication for your NestJS backend and Next.js frontend, integrating Drizzle ORM and PostgreSQL, and managing various authentication patterns like social login and 2FA.

Core Features & Use Cases

  • NestJS Backend Setup: Integrate Better Auth with NestJS, Drizzle ORM, and PostgreSQL for authentication.
  • Next.js Frontend Integration: Configure Next.js with Auth Router for seamless user authentication.
  • Social Login: Implement social authentication with GitHub, Google, and more.
  • 2FA and Plugins: Add additional features like 2FA, organizations, SSO, Magic Link, and Passkey for enhanced security.
  • Use Case: If you're building a web application that requires user authentication with advanced security features, this Skill can help you quickly set up and manage those features.

Quick Start

Use the better-auth skill to enable 2FA for your users and set up social login with GitHub.

Frequently Asked Questions about better-auth

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

FAQPage Schema
How do I set up authentication in NestJS using Drizzle ORM and PostgreSQL?

You can set up NestJS authentication by integrating Better Auth with Drizzle ORM and PostgreSQL to manage user credentials and backend sessions securely. This skill configures the necessary database adapters and backend authentication patterns.

Can I add social login with GitHub and Google to my Next.js frontend?

Yes, you can add social login with GitHub and Google to your Next.js frontend. This skill configures the Next.js Auth Router to handle social authentication providers seamlessly for user login flows.

Does this authentication approach support 2FA and Passkey for enhanced security?

Yes, the authentication setup supports 2FA and Passkey. This skill utilizes Better Auth plugins to add two-factor authentication and passkey functionality, providing enhanced security for user accounts.

What's the best way to manage user organizations and SSO in a Next.js application?

The best way to manage organizations and SSO is by utilizing the better-auth-organization and better-auth-sso plugins. This skill integrates these plugins to handle organizational structures and single sign-on flows.

Do I need PostgreSQL and Drizzle ORM to use Better Auth with NestJS?

Yes, PostgreSQL and Drizzle ORM are required backend dependencies to use Better Auth with NestJS. This skill leverages the better-auth-drizzle-adapter to connect the authentication system to your PostgreSQL database.

How do Magic Link and email verification work with Next.js authentication?

Magic Link and email verification work by utilizing the better-auth-magic-link and better-auth-email-verification plugins. This skill configures these plugins to enable passwordless login links and automatic email verification for users.