UNPKG

@auth0/auth0-spa-js

Version:

Auth0 SDK for Single Page Applications using Authorization Code Grant Flow with PKCE

12 lines (11 loc) 982 B
import { FetchOptions } from './global'; import { Dpop } from './dpop/dpop'; export declare const createAbortController: () => AbortController; /** * Wraps a single `fetch` call with an AbortController-based timeout and * returns the raw `Response`. Shared by the JSON token path and the revoke * path to avoid duplicating abort/timeout orchestration. */ export declare const fetchWithTimeout: (fetchUrl: string, fetchOptions: FetchOptions, timeout: number) => Promise<Response>; export declare const switchFetch: (fetchUrl: string, audience: string, scope: string, fetchOptions: FetchOptions, worker?: Worker, useFormData?: boolean, timeout?: number, useMrrt?: boolean) => Promise<any>; export declare function getJSON<T>(url: string, timeout: number | undefined, audience: string, scope: string, options: FetchOptions, worker?: Worker, useFormData?: boolean, useMrrt?: boolean, dpop?: Pick<Dpop, 'generateProof' | 'getNonce' | 'setNonce'>, isDpopRetry?: boolean): Promise<T>;