# Better Auth

> Open-source TypeScript authentication framework for modern web applications.

Better Auth is a comprehensive, open-source authentication framework designed for TypeScript web apps. It supports common identity standards like OAuth2 and OIDC alongside modern ecosystem adapters like Drizzle, Kysely, and SvelteKit. Developers turn to it as a flexible, self-hosted alternative to proprietary auth services or complex legacy libraries.

Website: https://github.com/better-auth/better-auth

## What it is for

- Implement OAuth and OIDC authentication in TypeScript web apps
- Manage user sessions and identity without paying for hosted auth providers
- Integrate authentication with ORMs like Drizzle or Kysely across various JavaScript runtimes

## Features

- TypeScript-first design with built-in type inference
- Support for OAuth, OAuth2, and OIDC protocols
- Database adapters including Drizzle, Kysely, and Cloudflare D1
- Pluggable architecture with community plugin ecosystem
- Framework support across Next.js, SvelteKit, and other JS environments

## Pricing

Open source. Free and open source under the MIT license

## Details

- Type: GitHub repo
- Category: [Development](https://xiry.app/topics/development.md)
- Open source: yes
- Platforms: Code library, Self-hosted
- For: TypeScript and full-stack web developers building authentication into modern web applications.
- Alternative to: NextAuth.js, Auth.js, Clerk, Supabase Auth, Lucia
- Tags: authentication, typescript, oauth, oidc, security, open source

## Why it was saved

- [@mazeincoding, 14 August 2025](https://x.com/mazeincoding/status/1956097584222634312): An authentication solution to consider or reuse when building products; the author singles it out as worth betting on.

## Related

- [2023 JavaScript Rising Stars](https://xiry.app/resources/2023-javascript-rising-stars): Annual overview of the fastest-growing JavaScript GitHub repositories in 2023. (Website, Free)
- [Cross-Subdomain Cookies in Better Auth](https://xiry.app/resources/cross-subdomain-cookies-in-better-auth): Share authentication sessions across multiple subdomains using Better Auth configuration. (Tip, Free)
- [Prismer Cloud](https://xiry.app/resources/prismer-cloud): Runtime and SDK harness for persistent, evolving AI agent memory (GitHub repo, Open source)
- [Social SDK](https://xiry.app/resources/social-sdk): Typed TypeScript SDK for publishing, analytics, and interactions across social platforms (Web app, Open source)
- [x-algorithm](https://xiry.app/resources/x-algorithm): The open-source code powering the For You recommendation feed on X. (GitHub repo, Open source)
- [awesome-llm-apps](https://xiry.app/resources/awesome-llm-apps): Open-source collection of runnable AI agent, skill, and RAG templates (GitHub repo, Open source)

Updated 10 October 2026. Page: https://xiry.app/resources/better-auth

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
