Skip to Content

API reference

Every public entry point, what it exports, and where its contract is documented.

Each process imports only the entry point it needs. A receiver never loads database code, and only the two better-auth entry points import Better Auth, an optional peer.

Every expected failure is a WebhookError with a stable code.

Conventions

  • Constructors validate options and return. They never open connections, apply migrations, or start workers.
  • Database and provider failures can propagate as other error types.
  • Trusted provider results use Date values. Better Auth route responses use ISO strings.
  • Scope arguments are null for application scope or { type, id } for a named scope. Selecting a scope never authorizes the caller. See scopes.

On this page