You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have played with this library a few days it's working nicely while I noticed when my application need to talk to google for longer tasks, some part of this code is not caching and retrieving some resource again and again, for example google's oauth token has one hour validity by default, so within the hour we can reuse it, only need to refresh it until it's almost expiring,
I'm doing some code changes locally to cache and it works better, can make a PR if it's welcome.
btw, google's library says refreshAccessToken is deprecated [2], I have switched to use getRequestMetadata; that is less code because google-auth-library handles token expiry and refresh itself pretty well
Sadly the method getRequestMetadata isn't officially documented (heck, it's already the "preferred way" to authorize, because .authorize is already deprecated).
For curious ones I'll just leave this here: googleapis/google-auth-library-nodejs#138
I have played with this library a few days it's working nicely while I noticed when my application need to talk to google for longer tasks, some part of this code is not caching and retrieving some resource again and again, for example google's oauth token has one hour validity by default, so within the hour we can reuse it, only need to refresh it until it's almost expiring,
I'm doing some code changes locally to cache and it works better, can make a PR if it's welcome.
btw, google's library says refreshAccessToken is deprecated [2], I have switched to use getRequestMetadata; that is less code because google-auth-library handles token expiry and refresh itself pretty well
The text was updated successfully, but these errors were encountered: