Skip to content

Commit 2227b4f

Browse files
emrysalzomars
andauthored
chore: Lower the threshold for eager token expiration (calcom#20964)
Co-authored-by: Omar López <zomars@me.com>
1 parent 5dd4937 commit 2227b4f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/app-store/googlecalendar/lib/CalendarAuth.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ const log = logger.getSubLogger({ prefix: ["app-store/googlecalendar/lib/Calenda
2929

3030
class MyGoogleOAuth2Client extends OAuth2Client {
3131
constructor(client_id: string, client_secret: string, redirect_uri: string) {
32-
super(client_id, client_secret, redirect_uri);
32+
super({
33+
clientId: client_id,
34+
clientSecret: client_secret,
35+
redirectUri: redirect_uri,
36+
// default: 5 * 60 * 1000, 5 minutes
37+
// tho, fn will never run in excess of 60 seconds
38+
eagerRefreshThresholdMillis: 60000,
39+
});
3340
}
3441

3542
isTokenExpiring() {

0 commit comments

Comments
 (0)