oauth2_token_manager
My university recently switched mails from a self hosted solution to Microsoft Office 365. Along with this migration a switch to oauth2-based authentication was pulled in. I use neomutt on a Maildir and sync mails with mbsync. Hence, I needed to have oauth2 authentication for mbsync.
There is a script called mutth_oauth2.py by Alexander Perlis that does the job for mutt. It stores the security sensitive oauth2 tokens using gnupg. I used this solution for some time but the frequent interactions with the gpg-agent were annoying.
So I wrote a small script called oauth2_token_manager that stores the tokens using symmetric encryption by openssl, which is combined with a wallet manager.
For more details on how to use this script, we refer to the README file on GitHub.