Skip to main content
Define shared broker behavior in hookfish.config.ts. Pass host-specific behavior as the second argument to HookfishServer.init.

Broker configuration

includeSwagger: false does not remove server routes. It filters the generated document to browser-safe operations and advertises /api/client as its server. For user-facing applications, keep includeClient at its default. Authenticate requests on your application API, then use a server-side Hono RPC client to call Hookfish with a scoped broker token.

Runtime options

runtime, browserOrigins, and brokerApiKey can resolve values from the current runtime bindings. The last three options apply to the optional browser facade. They are not needed when your application authenticates users separately and calls Hookfish from trusted server routes.

Provider inputs

providers accepts:
  • A record of provider IDs to implementations
  • A ProviderRegistry
  • A lazy ProviderSource
  • A synchronous or asynchronous factory that returns one of those inputs for the current bindings
Use a factory for request-bound secrets. Use createProviderSource for a large application-owned catalog where resolving one provider should not materialize the complete list. See Environment variables and OAuth providers for concrete values.