Skip to main content
Corsair only differs between modes in one place: the surfaces that need a public URL (OAuth callbacks, approval pages). Everything else (calling APIs, withTenant, hooks, the database layer, encryption) is identical.
  • Hub is the recommended path. Corsair hosts the connect, callback, and approval surfaces for you, and stores none of your credentials. See Hub overview.
  • Manual is the self-hosted alternative. You host those surfaces yourself — fully featured, no external dependency.
The picker is config on createCorsair: pass manual or hub.

What each mode asks you to build

The last row is the key one: credential storage never changes. Tokens live in your database under your KEK in both modes. Hub is a relay for the public-URL surfaces, not a vault.

Config side by side

corsair.ts
You also build the connect page, the OAuth callback route, and the approval review page. See OAuth Process for the full implementation.
Both modes use the same createLink API to start a connect flow. Only where the returned connectUrl points changes. See Connect / OAuth.

The connect flow in each mode

In both lanes the tokens end up in the same place: your database. Hub removes the two pages you would otherwise build, nothing more.

Choosing a mode

Choose manual when you want full control of the connect and approval surfaces, need everything inside your own domain, or cannot add an external hop in the auth path. Choose hub when you would rather not build and host those surfaces, or when you want one provider callback to cover local development and production at once. You can also mix: connect through Hub while keeping approvals manual, or the reverse. The two surfaces are configured independently.

What’s next

Hub overview

What Hub is and the relay / no-storage model.

Environments

Development vs production keys and delivery.

OAuth Process

The full manual-mode implementation with security best practices.

Connect / OAuth

The unified createLink API and its error codes.

Permissions

Approval policies, modes, and the review flow.