import { AxiosRequestConfig } from 'axios'; export interface AuthAdapter { onDestroy?: () => void | Promise; authenticate: () => Promise; /** * Modify axios config of requests requiring authentication */ interceptRequest?: (config: AxiosRequestConfig) => void; /** * Called on requests requiring authentication that received a 401 response * - If true is returned, request is retried without attempting to authenticate */ didAuthenticationHappenWhileRequestInFlight?: (config: AxiosRequestConfig) => boolean; }