better-auth-ts

Configure Better Auth for TypeScript apps with ORM adapters and CLI migrations.

2|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/NaimalArain13/Hackathon-II_The-Evolution-of-Todo --skill better-auth-ts-naimalarain13
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: better-auth-ts
Source: https://github.com/NaimalArain13/Hackathon-II_The-Evolution-of-Todo/tree/main/.claude/skills/better-auth-ts
Command: npx skills add https://github.com/NaimalArain13/Hackathon-II_The-Evolution-of-Todo --skill better-auth-ts-naimalarain13

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a robust, framework-agnostic authentication library for TypeScript applications, simplifying secure user login, session management, and authorization.

Core Features & Use Cases

  • Framework-agnostic Authentication: A single, reusable library to handle login, signup, and access control across Next.js, Express, and other TS web apps.
  • Comprehensive flows: Email/password, OAuth, JWT, sessions, two-factor authentication, and magic links.
  • Easy framework integrations: Seamless integration with Next.js 16 proxy.ts patterns and server/client templates for rapid wiring.
  • ORM adapters support: Works with Drizzle, Prisma, Kysely, and MongoDB adapters to persist users and sessions.
  • Use Case: Add enterprise-grade auth to a Next.js app with social login, 2FA, and session management in a few configuration files.

Quick Start

Install the library and one of the supported adapters, then wire up a server and client using the provided templates. Create the auth server and client, generate the auth schema with the CLI, and run migrations or migrations-gen as appropriate for your ORM.

Frequently Asked Questions about better-auth-ts

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

FAQPage Schema
How do I add TypeScript authentication with OAuth and 2FA to a Next.js app?

TypeScript authentication for Next.js apps can be implemented using a framework-agnostic library that streamlines OAuth, 2FA, and magic link flows. You configure a server and client, generate the auth schema with a CLI, and run ORM migrations to persist sessions securely.

Does TypeScript authentication work with Prisma, Drizzle, and MongoDB ORMs?

Yes, TypeScript authentication works with Prisma, Drizzle, Kysely, and MongoDB ORM adapters. These adapters handle the persistence of users and sessions, allowing the authentication framework to integrate smoothly with your existing database setup.

What's the best way to set up magic link and email password login in Express?

The best way to set up magic link and email password login in Express is using a framework-agnostic TypeScript authentication library. It provides built-in flows for both methods, requiring only server and client configuration along with an ORM adapter for database persistence.

Can I manage user sessions and authorization without building a custom backend?

Yes, you can manage user sessions and authorization using a dedicated TypeScript authentication library. It handles secure login, session management, and access control across Next.js and Express environments, eliminating the need to build a custom backend from scratch.

How do I generate database schemas for a TypeScript authentication setup?

To generate database schemas for TypeScript authentication, you use the framework's CLI tool after wiring up your server and client. This generates the necessary auth schema, which you then apply to your database using migration commands specific to your chosen ORM adapter.

What authentication flows are supported for modern TypeScript web applications?

Supported authentication flows for modern TypeScript web applications include email/password, OAuth, JWT, sessions, two-factor authentication, and magic links. The framework-agnostic library streamlines these flows, enabling secure login and authorization across various TS web platforms.