owenthereal / spotctl

A command-line interface to Spotify, written in Go
MIT License
243 stars 16 forks source link

unable to authenticate : local port not open #20

Open ssbarnea opened 5 years ago

ssbarnea commented 5 years ago

After installing spotctl and clicking the url given by spotctl devices (or login) i was redirected by spotify website to a local URL http://localhost:10028/callback?code=... but there is nothing running locally on that port.

And to be clear, I have no proxy configured in the browser. Any ideas?

Agezao commented 5 years ago

Hi @ssbarnea !

I've stumbled upon the same problem just now. I was trying to setup BitBar with spotctl and wasn't able to login. Same problem with Spotify redirecting to -> localhost.

Reading through the code before cloning the repo to build locally I've came across this line of code and a light appears 💡: image

And then I realised I was doing it wrong.

So the process is:

  1. Run spotctl login, it will generate the login link and start a local server at the port 10028 to check the response;
  2. Do the oAuth at Spotify with the generated URL;
  3. You'll receive a confirmation message at your browser and your terminal communicating the successful login.

After this everything was working as expected, and the best part: I didn't have to clone and build and anything.

Hope this helps.

encure commented 4 years ago

try to close your Spotify app, this worked for me.

ghost commented 4 years ago

I still get "Missing required parameter: client_id" when I click on the URL