MCPcopy Index your code
hub / github.com/better-auth/better-auth

github.com/better-auth/better-auth @v1.6.23 sqlite

repository ↗ · DeepWiki ↗ · release v1.6.23 ↗
4,741 symbols 16,442 edges 1,331 files 223 documented · 5% 103 cross-repo links
README
<img src="https://github.com/better-auth/better-auth/raw/v1.6.23/banner-light.png" alt="Better Auth Logo"/>

npm npm version GitHub stars

<a href="https://discord.gg/better-auth">Discord</a>
·
<a href="https://better-auth.com">Website</a>
·
<a href="https://github.com/better-auth/better-auth/issues">Issues</a>

Better Auth

Better Auth is a framework-agnostic 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 with minimal code in a short amount of time. Whether you need 2FA, multi-tenant support, or other complex features, it lets you focus on building your actual application instead of reinventing the wheel.

Why Better Auth

Authentication in the TypeScript ecosystem is a half-solved problem. Other open-source libraries often require a lot of additional code for anything beyond basic authentication. Rather than just pushing third-party services as the solution, I believe we can do better as a community—hence, Better Auth.

Contribution

Better Auth is a free and open source project licensed under the MIT License. You are free to do whatever you want with it.

You could help continuing its development by:

Security

If you discover a security vulnerability within Better Auth, please send an e-mail to security@better-auth.com.

All reports will be promptly addressed, and you'll be credited accordingly.

Extension points exported contracts — how you extend this code

OnlineManager (Interface)
(no doc) [4 implementers]
packages/better-auth/src/client/online-manager.ts
HelloWorldBinding (Interface)
* Hello World binding to serve as an explanatory example. DO NOT USE [1 implementers]
e2e/smoke/test/fixtures/cloudflare/worker-configuration.d.ts
NormalizeIPOptions (Interface)
* Normalizes an IP address for consistent rate limiting. * * Features: * - Normalizes IPv6 to canonical lowercase for
packages/core/src/utils/ip.ts
BetterAuthPluginRegistry (Interface)
(no doc)
packages/oauth-provider/src/oauth.ts
BetterAuthPluginRegistry (Interface)
(no doc)
packages/scim/src/index.ts
PrismaConfig (Interface)
(no doc)
packages/prisma-adapter/src/prisma-adapter.ts
DetectionInfo (Interface)
(no doc)
packages/telemetry/src/types.ts
RedisStorageConfig (Interface)
(no doc)
packages/redis-storage/src/redis-storage.ts

Core symbols most depended-on inside this repo

get
called by 1522
packages/core/src/context/request-state.ts
getTestInstance
called by 765
packages/better-auth/src/test-utils/test-instance.ts
set
called by 740
packages/core/src/context/request-state.ts
from
called by 696
packages/core/src/error/index.ts
json
called by 528
e2e/smoke/test/fixtures/cloudflare/worker-configuration.d.ts
signInWithTestUser
called by 493
packages/better-auth/src/test-utils/test-instance.ts
now
called by 432
e2e/smoke/test/fixtures/cloudflare/worker-configuration.d.ts
error
called by 416
e2e/smoke/test/fixtures/cloudflare/worker-configuration.d.ts

Shape

Function 3,461
Interface 722
Method 394
Class 163
Enum 1

Languages

TypeScript100%

Modules by API surface

e2e/smoke/test/fixtures/cloudflare/worker-configuration.d.ts566 symbols
packages/kysely-adapter/src/node-sqlite-dialect.ts48 symbols
packages/kysely-adapter/src/bun-sqlite-dialect.ts48 symbols
packages/core/src/types/context.ts36 symbols
packages/kysely-adapter/src/d1-sqlite-dialect.ts32 symbols
packages/oauth-provider/src/utils/index.ts29 symbols
packages/better-auth/src/plugins/mcp/client/adapters.ts29 symbols
packages/scim/src/routes.ts28 symbols
packages/better-auth/src/plugins/open-api/generator.ts28 symbols
docs/app/brand/brand-client.tsx27 symbols
docs/components/ai-chat.tsx26 symbols
packages/drizzle-adapter/src/drizzle-adapter.ts25 symbols

Dependencies from manifests, versioned

@ai-sdk/anthropic3.0.44 · 1×
@ai-sdk/openai3.0.29 · 1×
@ai-sdk/openai-compatible2.0.29 · 1×
@ai-sdk/react3.0.106 · 1×
@arethetypeswrong/cli0.18.2 · 1×
@babel/core7.29.0 · 1×
@babel/preset-env7.29.0 · 1×
@babel/preset-react7.28.5 · 1×
@babel/preset-typescript7.28.5 · 1×
@babel/runtime7.28.6 · 1×
@better-auth-test/test-utilsworkspace:* · 1×
@better-auth/api-keyworkspace:* · 1×

Datastores touched

better_authDatabase · 1 repos
(mysql)Database · 1 repos
better_authDatabase · 1 repos
(mongodb)Database · 1 repos

For agents

$ claude mcp add better-auth \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact