diff --git a/lib/oauth2.js b/lib/oauth2.js index 94ed662c..91a51218 100644 --- a/lib/oauth2.js +++ b/lib/oauth2.js @@ -169,7 +169,8 @@ exports.OAuth2.prototype.getOAuthAccessToken= function(code, params, callback) { var post_data= querystring.stringify( params ); var post_headers= { - 'Content-Type': 'application/x-www-form-urlencoded' + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': 'Basic ' + new Buffer(this._clientId + ':' + this._clientSecret).toString('base64') };