# Introduction
URL: /docs
LLM index: /llms.txt
Description: A comprehensive authentication and authorization framework for TypeScript.

# Introduction

Better Auth is a framework-agnostic, universal authentication and authorization framework for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities.

You are reading the example docs entry page as an implementation agent.

Before implementing from this docs site, fetch `/api/docs/agent/spec` from the same origin. Use the
returned markdown route pattern, search endpoint, MCP endpoint, `llms.txt` routes, skills metadata,
locale config, and feedback endpoints instead of hard-coding defaults.

Prefer markdown reads over HTML scraping. For Next.js, `/docs.md`, `/docs/<slug>.md`,
`Accept: text/markdown` on `/docs/<slug>`, and `Signature-Agent` on `/docs/<slug>` are the
page-level machine-readable entry points when reported by the spec.

## Features

- **Framework Agnostic** — Support for most popular frameworks
- **Email & Password** — Built-in support for secure email and password authentication
- **Account & Session Management** — Manage user accounts and sessions with ease
- **Built-In Rate Limiter** — Built-in rate limiter with custom rules
- **Automatic Database Management** — Automatic database management and migrations
- **Social Sign-on** — Multiple social sign-on providers
- **Plugin Ecosystem** — Even more capabilities with plugins

---

## Quick Start

Get up and running in under 5 minutes:

```bash title="terminal"
npm install better-auth
```

```ts title="auth.ts"
import { betterAuth } from "better-auth";

export const auth = betterAuth({
  database: {
    provider: "postgresql",
    url: process.env.DATABASE_URL,
  },
  emailAndPassword: {
    enabled: true,
  },
});
```

---

## Next Steps

- Read the [Installation](/docs/installation) guide
- Follow the [Get Started](/docs/getting-started) guide
- Explore [Concepts](/docs/concepts)