https://auth.corsair.dev/oauth/callback. Hub receives the callback and delivers the result to your app. How it delivers depends on which environment started the flow — development uses a browser redirect; production uses a signed server POST. See Why delivery works differently for the full picture.
Mount your handler
Your app exposes the delivery endpoint through the mounted Corsair handler.toNextJsHandler serves Hub delivery at the base path automatically:
app/api/corsair/[[...path]]/route.ts
hub config. It is resolved per environment (see below).
Development delivery
When your app uses a development API key (ck_dev_…), the SDK auto-detects where to deliver:
.env.local
CORSAIR_DELIVERY_URL (full endpoint URL) → http://localhost:{PORT}/api/corsair.
Hub redirects the user’s browser to that URL with a signed payload (?d=…). Because delivery is browser-mediated, it reaches localhost without a tunnel like ngrok.
No dashboard registration is required for development. On its first request, your app self-registers this URL with Hub — derived from the app’s own config, never from an inbound request — so the dashboard’s App sync indicator shows it live and turns green while your app is reachable. Pin it with CORSAIR_DELIVERY_URL, or edit it in the dashboard.
Production delivery
When your app uses a production API key (ck_prod_…), Hub POSTs a signed JSON envelope to the delivery URL registered in the Hub dashboard (Delivery URLs tab → Activate production).
signingSecret; your handler verifies the signature before accepting it.
Register or update the URL in the dashboard before deploying — production connect flows fail until production is activated.
The signing secret
Each delivered payload is signed with your environment’ssigningSecret. Your handler verifies the signature before accepting it, so only payloads from Hub for your project are applied. Keep the signing secret in server-side environment variables, never in client code.
Delivery URLs change where the result is routed. They do not change where credentials are stored. Tokens are still encrypted and persisted only in your database. See Hub overview.
What’s next
Environments
Development vs production keys and when to use each.
Hub dashboard
Activate production and manage delivery URLs.
Connect / OAuth
The createLink API.
Manual or Hub
What you build in each mode.