Skip to content

Interface: AuthGateApi

The handlers the gate middleware calls in-process (returned by AuthGatePlugin.exports).

readonly passkeysEnabled: boolean

Whether the runtime exposes passkey enrollment and authentication.

close(): Promise<void>

Close auth storage owned by this runtime.

Promise<void>


handler(request): Promise<Response>

Better Auth and compatibility routes under /api/email/auth/*.

Request

Promise<Response>


session(headers): Promise<string | undefined>

Resolve the authorized email for request headers, or undefined.

Headers

Promise<string | undefined>


status(headers): Promise<{ authenticated: boolean; email?: string; enabled: boolean; passkeysEnabled?: boolean; }>

The gate status payload.

Headers

Promise<{ authenticated: boolean; email?: string; enabled: boolean; passkeysEnabled?: boolean; }>