Type definitions for the Better‑Auth library’s Auth object and related types.
// Source: https://github.com/better-auth/better-auth | License: MIT | Copyright 2024 - present, Bereket Engida
// Provided via justclaw.it.com; keep this notice with the code.
import type { AuthContext, BetterAuthOptions } from "@better-auth/core";
import type { BASE_ERROR_CODES } from "@better-auth/core/error";
import type { router } from "../api";
import type { InferAPI } from "./api";
import type { InferPluginTypes, Session, User } from "./models";
import type { InferPluginContext, InferPluginErrorCodes } from "./plugins";
export type Auth<Options extends BetterAuthOptions = BetterAuthOptions> = {
handler: (request: Request) => Promise<Response>;
/**
* Alias for {@link Auth.handler}.
*/
fetch: (request: Request) => Promise<Response>;
api: InferAPI<ReturnType<typeof router<Opti
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key