diff --git a/authorization_code/app.js b/authorization_code/app.js index 4f72903..588dea1 100644 --- a/authorization_code/app.js +++ b/authorization_code/app.js @@ -76,9 +76,10 @@ app.get('/callback', function(req, res) { form: { code: code, redirect_uri: redirect_uri, - grant_type: 'authorization_code', - client_id: client_id, - client_secret: client_secret + grant_type: 'authorization_code' + }, + headers: { + 'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64')) }, json: true };