summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean <gao.dean@hotmail.com>2023-01-28 12:45:14 +1100
committerRobin Jarry <robin@jarry.cc>2023-01-28 18:24:05 +0100
commit998f052682d845795303b8d0cc0b05252af65928 (patch)
tree2c8928fea697a4d1f89381a76ff984a50eacf09d
parent9433a79f1987d61c99b99c63e2b4f1ee5e0c65d9 (diff)
downloadaerc-998f052682d845795303b8d0cc0b05252af65928.tar.gz
aerc-998f052682d845795303b8d0cc0b05252af65928.zip
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>
-rw-r--r--providers/microsoft.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/providers/microsoft.md b/providers/microsoft.md
index a9f70ec9..c5d8c0aa 100644
--- a/providers/microsoft.md
+++ b/providers/microsoft.md
@@ -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