spotify / web-api-examples

Basic examples to authenticate and fetch data using the Spotify Web API
Apache License 2.0
1.99k stars 1.67k forks source link

Buffer depreciated #91

Closed Yasar195 closed 1 year ago

Yasar195 commented 1 year ago

Buffer deprecated

i've noticed there is a depreciated warning from the use Buffer class from Authorization example

ddoggdiggitty commented 1 year ago

I would suggest replacing line 19 of the app.js file with the following code

'Authorization' : 'Basic ' + (new Buffer.from(client_id + ':' + client_secret, 'toBase64'))

Perhaps that might work?

Yasar195 commented 1 year ago

Thanks mate that's worked for me