Created attachment 2056 [details]
patch file. apply with patch -p0 < out.patch
My employer forced Google's OAUTH on me this Friday (and suggested I move to Thunderbird), so instead I added support to authenticate IMAP using OAUTH2, as described in https://tools.ietf.org/html/rfc6749. It is added as a compile time dependency since it adds two dependencies:
The OAUTH2 logic is split into its own file because in a future patch I will it add support for SMTP.
Google is phasing out 'Less Secure Apps' in the near future so without this claws becomes useless for gmail users.
Can we please make this a priority?