Closed chanseokoh closed 6 years ago
I have never been 100% certain to assert this, but as I said above, I think there is no need to refresh it. We have a refresh token, which doesn't expire (barring some rare events), and looking at code and from our experience, the access token is automatically refreshed.
We may still try to refresh access tokens, but I am not sure if there is a merit with it.
It seems that
Credential
automatically refreshes its access token if it expires soon, or if there is no access token, so we may not need to be bothered about manually refreshing it.https://github.com/google/google-oauth-java-client/blob/dev/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/Credential.java#L217