~kevin8t8/mutt

7c4fa47888d0dee4529f3a521bec76420528776e — Cline, Wade 3 months ago 16d8ad6
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.
1 files changed, 1 insertions(+), 0 deletions(-)

M contrib/mutt_oauth2.py
M contrib/mutt_oauth2.py => contrib/mutt_oauth2.py +1 -0
@@ 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())