From 7c4fa47888d0dee4529f3a521bec76420528776e Mon Sep 17 00:00:00 2001 From: "Cline, Wade" Date: Mon, 19 Dec 2022 18:53:43 -0800 Subject: [PATCH] mutt_oauth2: Print access token request message There are cases when using the 'authcode' grant where the authorization request will succeed but the access token request will fail (for example: if the user's web browser and terminal use different proxy settings). The current implementation of the script does not inform the user that the authorization token is being exchanged for an access code, with the result that it can appear that a request has both succeeded (according to the browser) and failed (according to the terminal output) simultaneously. Add a message to inform the user that a second request is being made so there is less potential for confusion. --- contrib/mutt_oauth2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/mutt_oauth2.py b/contrib/mutt_oauth2.py index ed241fc6..52358e94 100644 --- a/contrib/mutt_oauth2.py +++ b/contrib/mutt_oauth2.py @@ -239,6 +239,7 @@ if args.authorize: 'code': authcode, 'client_secret': registration['client_secret'], 'code_verifier': verifier}) + print('Exchanging the authorization code for an access token') try: response = urllib.request.urlopen(registration['token_endpoint'], urllib.parse.urlencode(p).encode()) -- 2.38.4