From f9e8672cd3affd4a2bd2d0a77427a0417ac3635e Mon Sep 17 00:00:00 2001 From: Florian Date: Sun, 10 Dec 2023 22:29:20 +0100 Subject: [PATCH] expiration should really be checked correctly :( --- src/internal/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/auth.ts b/src/internal/auth.ts index 975656f..b3fa03c 100644 --- a/src/internal/auth.ts +++ b/src/internal/auth.ts @@ -55,7 +55,7 @@ export class CFToolsAuthorizationProvider implements AuthorizationProvider { } private hasToken(): boolean { - return !!this.token && !!this.expired && this.expired.getTime() <= new Date().getTime(); + return !!this.token && this.expired !== undefined && this.expired.getTime() >= new Date().getTime(); } private async fetchToken(client: HttpClient): Promise {