fabiofalci / sconsify

A spotify console application
https://fabiofalci.github.io/sconsify
Apache License 2.0
566 stars 26 forks source link

Wipe api-key? Issue with login #65

Open towicode opened 7 years ago

towicode commented 7 years ago

Hi first I have a facebook connected spotify account, not sure if that changes anything.

I'm trying to run with the web api option (because the non-web-api doesn't work at all for me) and I'm getting the following error after plugging in my username and password.

By the way, the first time I did this it asked me to copy and paste a key, but now I can't even get that option.

Error: Username doesn't match with web-api authorization

towicode commented 7 years ago

Found the json file in /.sconsify, but even after trying it again I'm still getting that error. Perhaps it's an issue with a facebook connected account?

fabiofalci commented 7 years ago

hi, my account is connected to facebook as well however I use my normal spotify login when log in on sconsify, which is my email.

And then in the browser you need to make sure to use the same user because spotify will generate a key for that user. Again, in the browser I connect to spotify using my normal sconsify login, not the facebook one.

And yeah, the key is on/.sconsify and once you get a wrong key or something, you need to manually delete it. Will try to fix that.

towicode commented 7 years ago

here's exactly what i'm doing

  1. enter facebook related email
  2. enter facebook password
  3. goto url
  4. copy code into console.
  5. Error: Username doesn't match with web-api authorization
fabiofalci commented 7 years ago

ok, that's odd.

Can you log out from the browser so when you open the url next time you'll need to log in?

Also, let me double check if my account is facebook linked. Don't remember if I've linked or not.

towicode commented 7 years ago

I tried what you said, logged out and then only logged in after copying the url. I'm still getting that same error :cry:

fabiofalci commented 7 years ago

Yeah, I couldn't find any info on my account about facebook link. Maybe it's not linked.

It seems we got a bug when using facebook accounts then.

fabiofalci commented 7 years ago

Ok, I believe I had linked and then decided to unlink at some point, don't remember why though.

If you're willing to test you can unlink facebook:

https://support.spotify.com/uk/account_payment_help/account_settings/i-want-to-use-spotify-without-facebook/

towicode commented 7 years ago

Okay I'm gonna try this, I don't really care for the link to facebook anyways, but since I actually created my account with facebook I'm gonna have to contact their support. Will comment back whenever they finish the request.

fabiofalci commented 7 years ago

Ok, thanks.

Anyway, we probably need to fix that.

The code is this:

 if privateUser.ID != spotify.session.LoginUsername() {
   return errors.New("Username doesn't match with web-api authorization")
}

One user comes from libspotify (sconsify log in) and the other from web-api (browser log in).

The idea is to guarantee the same user in the sconsify log in and the web browser. Probably it'll need to be more clever than that when using facebook accounts.

towicode commented 7 years ago

I was able to login after removing facebook from my account.

fabiofalci commented 7 years ago

Cool. And I realised I get the same error if I use my email in the sconsify log in. What I've been using is username, not email.

Anyway, something is not quite right and the bug is raised to be fixed.

towicode commented 7 years ago

also btw when using my DAC usb audio, the playing of music doesn't work. It just makes a clicking noise. not sure if that's on you or the portaudio or whatever library.

fabiofalci commented 7 years ago

I don't know about this DAC usb audio not working.

But I'd probably say is a library thing, portaudio or something.

FuzzOli87 commented 7 years ago

I just ran into this issue. I'm used to typing in my user name like "UserName" and kept getting the error.

Turns out my username in Spotify is actually "username".

patrickelectric commented 7 years ago

I have the same problem.

patrickelectric commented 7 years ago

I have tried this And get: Error: General permanent error

xakod commented 4 years ago

I have the same error but not with facebook. I used my spotify email spotify pass copied token from site caught this error