diff --git a/agent/src/index.ts b/agent/src/index.ts index 9b48767b..d89fc2be 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -27,9 +27,8 @@ function parseJwtExp(token: string): number | null { } } -let refreshPromise: Promise | null = null - export const createAuthFetcher = (auth: AgentAuthContext): AuthFetcher => { + let refreshPromise: Promise | null = null return async (url: string, options?: RequestInit) => { if (auth.bearer) { const exp = parseJwtExp(auth.bearer)