Skip to content

authFetch

function authFetch(
host,
url,
init?
): Promise<Response>;

Defined in: core/src/auth/oauth.ts:95

fetch with a deadline, for every request in auth/.

A sign-in server that accepts the connection and never answers would hold the one shared refresh forever, and every call waiting on it with it. No clock above this one cuts it: the watchdog only starts once the model request is sent. The timeout rejects with a TimeoutError, which is not a refusal, so tokenSource keeps the stored credential.

Parameter Type
host Pick<AuthHost, "fetchImpl" | "timeoutMs">
url string
init RequestInit

Promise<Response>