The gateway
Vendor tokens are never handled by the application code that wants them. They are encrypted with a sealed box, and the only code that can open one is a gateway module that imports nothing else in the app. The gateway runs in-process on loopback in every install, cloud and self-hosted alike. It is not optional: if it fails to start, every connection path fails with it.Vendor OAuth clients
Some vendors, GitHub, Google and HubSpot among them, refuse dynamic client registration and require a callback URL registered in advance. A self-hosted install cannot add its own callback to somebody else’s OAuth app, so there are two ways to go:- Register your own apps and paste the client id and secret into server settings. Fully independent.
- Borrow through a broker.
BROKER_URLpoints at an install that holds vendor clients and performs the token request on your behalf. The tokens come back sealed to your install’s own key, and from then on you talk to the vendor directly.
Brokering means the browser lands briefly on the broker’s hostname during a connect, and there is no way
around it: the vendor only honours a callback registered against the client. It also requires your install
to be reachable from the public internet, because registration proves you control your own base URL by
fetching it.
BROKER_URL= empty to switch brokering off entirely and use only clients you registered yourself.