>Ah, that library was not listed on the OAuth web page. But ... I would >caution you that it seems like that library hasn't been worked on in 4-5 >years and it looks like it only implements OAuth 1.0 (the original XOAUTH >mechanism), and GMail now supports OAuth 2.0. To follow-up to myself ... I see that the OAuth people developed RFC 7628, which defines a new SASL mechanism called OAUTHBEARER which fixes the concerns I had with XOAUTH2. And that is supported by Gmail; if I was going to write some code, I'd focus my effort on that as it probably has the best long-term support prospects. --Ken