gauteh / lieer

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

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

Closed julian-klode closed 1 month ago

julian-klode commented 2 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 2 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 1 month ago

Thanks. Finally merged this.