Closed julian-klode closed 7 months ago
This is a bit sad, I have no idea why the library is stuck on 1.5.x in Debian, but I figured let's just make this work. This means doing a refresh on every sync which is annoying but that is the old library version for you.
Thanks. Finally merged this.
Implement our own to_json() method and adjust the code handling the refresh of the credentials: Old versions of the library did not read expiry or token from the file, needing you to refresh the token, but we did not trigger refresh because the token was never considered expired, hence check whether we have a token, and , if not, also consider it expired.
Additionally, make the credential storage atomic such that we do not accidentally write an empty credential file on errors.