make this a comma, that way encode_xoauth2 doesn't create a global variable. also, could you in the comment above the commented out console.log, paste in this link: https://developers.google.com/gmail/xoauth2_protocol that way someone new can understand why the encoding is the way it is.

i think a test would be nice, just to ensure this functionality doesn't break in the future. overall, thank you for this addition i'll merge it in once travisCI passes