{"action":"created","issue":{"url":"https://api.github.com/repos/andris9/smtp-connection/issues/25","labels_url":"https://api.github.com/repos/andris9/smtp-connection/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/andris9/smtp-connection/issues/25/comments","events_url":"https://api.github.com/repos/andris9/smtp-connection/issues/25/events","html_url":"https://github.com/andris9/smtp-connection/issues/25","id":108349774,"number":25,"title":"this._auth.xoauth2 does not have method 'getToken'","user":{"login":"ggallo","id":3633936,"avatar_url":"https://avatars.githubusercontent.com/u/3633936?v=3","gravatar_id":"","url":"https://api.github.com/users/ggallo","html_url":"https://github.com/ggallo","followers_url":"https://api.github.com/users/ggallo/followers","following_url":"https://api.github.com/users/ggallo/following{/other_user}","gists_url":"https://api.github.com/users/ggallo/gists{/gist_id}","starred_url":"https://api.github.com/users/ggallo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggallo/subscriptions","organizations_url":"https://api.github.com/users/ggallo/orgs","repos_url":"https://api.github.com/users/ggallo/repos","events_url":"https://api.github.com/users/ggallo/events{/privacy}","received_events_url":"https://api.github.com/users/ggallo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-25T15:40:24Z","updated_at":"2015-09-25T18:22:44Z","closed_at":"2015-09-25T18:22:44Z","body":"Using [nodemailer-smtp-transport](https://github.com/andris9/nodemailer-smtp-transport/tree/v1.0.3)@1.0.3 via [nodemailer](https://github.com/andris9/Nodemailer/tree/v1.5.0)@1.5.0\r\n\r\nSetting up the mailer:\r\n```\r\nvar transporter = nodemailer.createTransport({\r\n        service: 'gmail',\r\n        auth: {\r\n          xoauth2: {\r\n            user: \"XXXXXXXX@gmail.com\",\r\n            clientId: \"XXXXXXX.apps.googleusercontent.com\",\r\n            clientSercret: \"XXXXXXXXXX\",\r\n            refreshToken: \"XXXXXXXX\"\r\n          }\r\n        }\r\n    });\r\n```\r\n\r\nAnd the resulting error:\r\n```\r\nTypeError: Object #<Object> has no method 'getToken'\r\n    at SMTPConnection._handleXOauth2Token (/home/ec2-user/node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/src/smtp-connection.js:961:67)\r\n    at SMTPConnection.login (/home/ec2-user/node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/src/smtp-connection.js:233:18)\r\n    at SMTPTransport.<anonymous> (/home/ec2-user/node_modules/nodemailer/node_modules/nodemailer-smtp-transport/src/smtp-transport.js:96:24)\r\n    at SMTPConnection.g (events.js:180:16)\r\n    at SMTPConnection.emit (events.js:92:17)\r\n    at SMTPConnection._actionEHLO (/home/ec2-user/node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/src/smtp-connection.js:692:10)\r\n    at SMTPConnection._processResponse (/home/ec2-user/node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/src/smtp-connection.js:511:16)\r\n    at SMTPConnection._onData (/home/ec2-user/node_modules/nodemailer/node_modules/nodemailer-smtp-transport/node_modules/smtp-connection/src/smtp-connection.js:357:10)\r\n    at CleartextStream.emit (events.js:95:17)\r\n    at CleartextStream.<anonymous> (_stream_readable.js:765:14)\r\n    at CleartextStream.emit (events.js:92:17)\r\n    at emitReadable_ (_stream_readable.js:427:10)\r\n    at _stream_readable.js:420:7\r\n    at process._tickCallback (node.js:442:13)\r\n```\r\nThe initial offending code for [convenience](https://github.com/andris9/smtp-connection/blob/v1.3.1/src/smtp-connection.js#L955)."},"comment":{"url":"https://api.github.com/repos/andris9/smtp-connection/issues/comments/143313824","html_url":"https://github.com/andris9/smtp-connection/issues/25#issuecomment-143313824","issue_url":"https://api.github.com/repos/andris9/smtp-connection/issues/25","id":143313824,"user":{"login":"andris9","id":132242,"avatar_url":"https://avatars.githubusercontent.com/u/132242?v=3","gravatar_id":"","url":"https://api.github.com/users/andris9","html_url":"https://github.com/andris9","followers_url":"https://api.github.com/users/andris9/followers","following_url":"https://api.github.com/users/andris9/following{/other_user}","gists_url":"https://api.github.com/users/andris9/gists{/gist_id}","starred_url":"https://api.github.com/users/andris9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andris9/subscriptions","organizations_url":"https://api.github.com/users/andris9/orgs","repos_url":"https://api.github.com/users/andris9/repos","events_url":"https://api.github.com/users/andris9/events{/privacy}","received_events_url":"https://api.github.com/users/andris9/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T18:22:44Z","updated_at":"2015-09-25T18:22:44Z","body":"See here for the details of using XOAuth2: https://github.com/andris9/nodemailer-smtp-transport#authentication"}}