chore: Lower the threshold for eager token expiration (#20964)
Co-authored-by: Omar López <zomars@me.com>
This commit is contained in:
co-authored by
Omar López
parent
5dd4937a1a
commit
2227b4ff91
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user