Rigellute / spotify-tui

Spotify for the terminal written in Rust 🚀
MIT License
17.34k stars 518 forks source link

Spotify Auth Failed #1049

Open EsharkyTheGreat opened 1 year ago

EsharkyTheGreat commented 1 year ago

After entering the client id and client secret, the authentication url is opened in my browser and the redirected to localhost:8888/callback?code=something_here, however there it is unable to establish a connection and spt prints out Spotify Auth Failed

pehlicd commented 1 year ago

Have you done this step 4 in Connecting to Spotify’s API doc? You must enter the url in your spotify app dashboard for once.

EsharkyTheGreat commented 1 year ago

Yes, I've added the url and as I said I get redirected to localhost after authentication, I even get the code parameter in the url I'm getting redirected to, but I get spotfiy auth failed after that

pehlicd commented 1 year ago

Could you go to Spotify Dashboard and go to the app that you created earlier after that click to the Edit Settings button then check the Redirect URIs section? You should see http://localhost:8888/callback url if you don't see, add it and run spt.

EsharkyTheGreat commented 1 year ago

Yup, as I said already the url is present in the Refirect URIs section, and I also get redirected to localhost:8888/callback?code= just for a second then the spt binary throws auth failed.

(edit) From the code I see that the err message spotify auth failed is thrown when the code value recieved by the local webserver is used to get a accesstoken but it fails

pehlicd commented 1 year ago

I guess it should only be http://localhost:8888/callback that url not the localhost:8888/callback?code=. You can also check the ${HOME}/.config/spotify-tui/client.yml file just to be sure that you have provided the true credentials.