chore: Lower the threshold for eager token expiration (#20964)

Co-authored-by: Omar López <[email protected]>
This commit is contained in:
Alex van AndelandOmar López authored and GitHub committed 2025-06-20 14:33:23 -04:00
1 parent 5dd4937a1a
commit 2227b4ff91
1 file changed
+8 -1
@@ -29,7 +29,14 @@ const log = logger.getSubLogger({ prefix: ["app-store/googlecalendar/lib/Calenda
class MyGoogleOAuth2Client extends OAuth2Client {
constructor(client_id: string, client_secret: string, redirect_uri: string) {
super(client_id, client_secret, redirect_uri);
super({
clientId: client_id,
clientSecret: client_secret,
redirectUri: redirect_uri,
// default: 5 * 60 * 1000, 5 minutes
// tho, fn will never run in excess of 60 seconds
eagerRefreshThresholdMillis: 60000,
});
}
isTokenExpiring() {