Change how credentials are sent when requesting tokens
The preferred way to send the credentials is through the Authorization header, ase documented on the Spotify Developer Site (see https://developer.spotify.com/web-api/authorization-guide/#authorization_code_flow)
This commit is contained in:
parent
d3f229bad3
commit
0464cf41ca
1 changed files with 4 additions and 3 deletions
|
@ -76,9 +76,10 @@ app.get('/callback', function(req, res) {
|
||||||
form: {
|
form: {
|
||||||
code: code,
|
code: code,
|
||||||
redirect_uri: redirect_uri,
|
redirect_uri: redirect_uri,
|
||||||
grant_type: 'authorization_code',
|
grant_type: 'authorization_code'
|
||||||
client_id: client_id,
|
},
|
||||||
client_secret: client_secret
|
headers: {
|
||||||
|
'Authorization': 'Basic ' + (new Buffer(client_id + ':' + client_secret).toString('base64'))
|
||||||
},
|
},
|
||||||
json: true
|
json: true
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue