~rjarry/aerc

998f052682d845795303b8d0cc0b05252af65928 — Dean 1 year, 5 months ago 9433a79
providers/microsoft: add simpler Office365 instructions

With https://github.com/gaoDean/oauthRefreshToken, there is no need for
mutt_oauth2.py and a personal azure app. The script just takes in your
account, and spits out the refresh token.

This is advantageous because since commit 38d63cb7f788 ("imap,smtp:
cache and cycle XOAUTH2 refresh token"), when xoauth2 is used and
a refresh token is passed, the refresh token will self refresh, whereas
with mutt_oauth2.py, you are generating the actual token, which will
expire and there is generally a lot of moving parts. With
refresh_token.py, it basically serves as a jump start, and everything
else is handled natively within aerc.

Signed-off-by: Dean <gao.dean@hotmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
1 files changed, 11 insertions(+), 0 deletions(-)

M providers/microsoft.md
M providers/microsoft.md => providers/microsoft.md +11 -0
@@ 30,6 30,16 @@ Instructions are provided below. This topic has been discussed [multiple][9]
[times][10] on the mailing list as well -- those threads may have additional
useful information.

Basically clone [oauthRefreshToken][11] and follow the steps in the README.
After that, the refresh token will be self cycling, replacing itself with a
fresh one cached in `~/.cache/aerc/<account>-xoauth.token`, so you can delete
the initial token generated by `refresh_token.py` after you see the cached
token appear (which should generate after the first use of the account).

If the above doesn't work, see the alternate steps below.

### mutt_oauth2.py

The first step is to use a script such as [`mutt_oauth2.py`][2] or [oauth2ms][3]
to fetch a token. With `mutt_oauth2.py`, the basic steps are as follows:



@@ 114,3 124,4 @@ Then simply setup a Maildir account for aerc as described in aerc-maildir(5).
[8]: https://unix.stackexchange.com/questions/625637/configuring-mbsync-with-authmech-xoauth2
[9]: https://lists.sr.ht/~rjarry/aerc-discuss/%3CCA%2BrC5JmSTNDTd%3DKB0h-NeXRExB2QpHCWCOXch4%2BA%3DCiTX0wFAw%40mail.gmail.com%3E
[10]: https://lists.sr.ht/~rjarry/aerc-discuss/%3CCNKU4TGF41CJ.3HIV0H45QQWU2%40manjaro%3E
[11]: https://github.com/gaoDean/oauthRefreshToken