UNPKG

better-auth

Version:

The most comprehensive authentication library for TypeScript.

43 lines (40 loc) 1.2 kB
import * as better_call from 'better-call'; import { H as HookEndpointContext } from '../../shared/better-auth.Bs_C2zap.mjs'; import '../../shared/better-auth.Bi8FQwDD.mjs'; import 'zod'; import '../../shared/better-auth.DNEJbRnE.mjs'; import 'jose'; import 'kysely'; import 'better-sqlite3'; import 'bun:sqlite'; interface BearerOptions { /** * If true, only signed tokens * will be converted to session * cookies * * @default false */ requireSignature?: boolean; } /** * Converts bearer token to session cookie */ declare const bearer: (options?: BearerOptions) => { id: "bearer"; hooks: { before: { matcher(context: HookEndpointContext): boolean; handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<{ context: { headers: Headers; }; } | undefined>; }[]; after: { matcher(context: HookEndpointContext): true; handler: (inputContext: better_call.MiddlewareInputContext<better_call.MiddlewareOptions>) => Promise<void>; }[]; }; }; export { bearer };