From b36662964b5b56b8ec2abab2c2ea4d21502de4d6 Mon Sep 17 00:00:00 2001 From: ssterling Date: Wed, 29 Oct 2025 12:52:22 -0700 Subject: [PATCH] Fix token exp logic --- lib/credentials.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/credentials.js b/lib/credentials.js index 87bcaa4..ec811d4 100644 --- a/lib/credentials.js +++ b/lib/credentials.js @@ -153,7 +153,8 @@ class Credentials { var token = this.token; if (token && token.expiration) { - return new Date(Date.now() - 5000) > token.expiration; + //get new token 5 min before expiration + return new Date(Date.now() + 300000) > token.expiration; } else { return true; }