diff --git a/src/oauth2.js b/src/oauth2.js index ea6e1b7..0ef50b0 100644 --- a/src/oauth2.js +++ b/src/oauth2.js @@ -17,7 +17,7 @@ module.exports = function(p, callback) { client_id: p.client_id || p.id, client_secret: p.client_secret, grant_type: 'authorization_code', - redirect_uri: encodeURIComponent(p.redirect_uri) + redirect_uri: p.redirect_uri }; } else if (p.refresh_token) { @@ -40,7 +40,7 @@ module.exports = function(p, callback) { } // Convert the post object literal to a string - post = param(post, function(r) {return r;}); + post = param(post); // Create the request var r = url.parse(grant_url);