@orangecheck/auth-client / installTabFetchInterceptor
Function: installTabFetchInterceptor()
function installTabFetchInterceptor(authOrigin: string): () => void;
Defined in: tab-session.ts:108
Install a scoped window.fetch wrapper that attaches the tab pin to
every same-site request, so app-level data fetches (vault shares, me
wallet, fleet projects, …) execute as the account this tab displays —
without touching any call site. Returns an uninstaller.
Conservative by design:
- no pin → pass-through (zero behavior change)
- only same-origin + auth-host URLs (see isPinnableUrl)
- never overrides an existing
Authorizationorx-oc-tab-sessionheader (programmatic Bearer / integrator-token paths keep their own credential semantics) - any internal error → original fetch, untouched
Parameters
| Parameter | Type |
|---|---|
authOrigin | string |
Returns
() => void