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
Hi,
I think that order of setting new refresh token and calling listener should be switched in method com.google.api.client.auth.oauth2.Credential#refreshToken.
Currently first is setFromTokenResponse called and second refreshListener.onTokenResponse is called. Method setFromTokenResponse changes currently Credential instance and this side-effected instance is passed to onTokenResponse.
My use-case is that I want to check/"pass somewhere" old tokens in listener and because of this order I am unable to get valid old tokens from Credential instance.
Is this behaviour intentional or I found bug? I can create PR.
Thx,
Ivos
The text was updated successfully, but these errors were encountered:
Hi,
I think that order of setting new refresh token and calling listener should be switched in method
com.google.api.client.auth.oauth2.Credential#refreshToken
.Currently first is
setFromTokenResponse
called and secondrefreshListener.onTokenResponse
is called. MethodsetFromTokenResponse
changes currentlyCredential
instance and this side-effected instance is passed toonTokenResponse
.My use-case is that I want to check/"pass somewhere" old tokens in listener and because of this order I am unable to get valid old tokens from
Credential
instance.Is this behaviour intentional or I found bug? I can create PR.
Thx,
Ivos
The text was updated successfully, but these errors were encountered: