Connections that start anywhere and come back to the right place

OAuth connections always use one registered redirect URI, carry a signed state naming the account, user and origin, and return the person to the surface they started from.

What it is

A signed state payload carrying the account id, user id, starting origin, timestamp and popup flag, plus a kind marker so one callback can serve several products. The callback validates the signature and a 15-minute expiry, then resolves the return destination — preferring the account's own subdomain when it can name it.

Also called: URL blocked · redirect URI · connect from my subdomain · OAuth state

See it
Connections that start anywhere and come back to the right place
CustomerBuildingAmountStatus
Marlin HooverRiding Arena$6,520Open
Sutter KlineEquipment Storage$7,850Draft
Gideon Alt40×64 Shop$3,670Open
Ronan Petsch30×40 Garage$10,700Open
Ronan Petsch40×64 Shop$18,110Open
A flow diagram: subdomain → dialog → single apex callback → back to subdomain, with the signed state travelling along. Sample data — no customer information appears here.
How it works
  1. 1The connect route packs a signed state and redirects to the provider's dialog with the constant registered redirect URI.
  2. 2The provider returns to that one URI with the code and state.
  3. 3The state is verified and checked for expiry.
  4. 4The kind marker routes the callback to the right handler (calendar, search console, ads).
  5. 5The browser is returned to the tenant subdomain when resolvable, otherwise to the origin from the state.
Why we built it

Both providers document the same constraint. The Meta route: 'ALWAYS the apex — the app is PUBLISHED (live mode), and Facebook refuses any redirect URI that isn't exactly whitelisted, localhost included (Keith hit "URL Blocked" starting from dev). Dev and prod share one database, so the production callback stores the connection and then sends the browser back to the ORIGIN in the signed state.' The subdomain preference has its own recorded incident: 'subdomains are the canonical tenant context and dodge every apex-host gate (Keith connected from bare localhost and the owner-gate ate his landing)'.

The problem
  • Providers refuse redirect URIs that are not exactly whitelisted, breaking development.
  • A callback on the apex could not tell which tenant or surface the flow began on.
  • Returning to the apex tripped host-based access gates.
Sound familiar?
What you get
One registered URI serves every environment and every tenant.
The person lands back exactly where they started.
The state cannot be tampered with or replayed after 15 minutes.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →