better-auth
Version:
The most comprehensive authentication library for TypeScript.
45 lines (42 loc) • 1.24 kB
text/typescript
import * as better_call from 'better-call';
import { H as HookEndpointContext } from '../../shared/better-auth.CdI2sJZM.mjs';
import 'kysely';
import 'zod/v4';
import '../../shared/better-auth.ZSfSbnQT.mjs';
import '../../shared/better-auth.QdXfKtIf.mjs';
import 'jose';
import 'zod/v4/core';
import 'zod';
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 };