gauteh / lieer

Fast email-fetching, sending, and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
553 stars 62 forks source link

Handle the old python3-google-auth in Debian (1.5.x) #276

Closed julian-klode closed 7 months ago

julian-klode commented 8 months ago

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.

julian-klode commented 8 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.

gauteh commented 7 months ago

Thanks. Finally merged this.