joestump / python-oauth2

A fully tested, abstract interface to creating OAuth clients and servers.
MIT License
2.99k stars 912 forks source link

Explicitly encode XOAuth string #239

Closed fw-aaron closed 1 year ago

fw-aaron commented 4 years ago

Without encodeing the string, I get the following error:

File "/usr/lib/python3.8/site-packages/oauth2/clients/smtp.py", line 41, in authenticate base64.b64encode(oauth2.build_xoauth_string(url, consumer, token))) File "/usr/lib/python3.8/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str'