Open klinga opened 4 years ago
try:
del credentials.token_response["refresh_token"]
except KeyError:
pass
keyring.set_password(self._service_name, self._user_name,
credentials.to_json())
add following (reponse got even longer apparently):
try:
del credentials.token_response["refresh_token"]
del credentials.token_response["access_token"]
except KeyError:
pass
this seems to work better:
credentials.token_response = None
A while back Google changed access token response for their authorization service. The response lists refresh_token param twice making it too long for Windows Credentials Manager to store. The best would be to move away from oauth2client to a newer, Python 3 library such as google-auth or oauthlib. That would require though refactoring Overload to Python 3 - a large undertaking, especially considering its reliance on PyZ3950 which is Py2 only.
In the meantime, the easiest way to deal with access token response is to delete one of the refresh_token params from credentials object in the oauth2client.contrib.keyring_storage in the locked_put method.