hrkfdn / ncspot

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
BSD 2-Clause "Simplified" License
5.06k stars 211 forks source link

Facebook/Google auth support undocumented #829

Open holmanb opened 2 years ago

holmanb commented 2 years ago

Describe the bug Per the readme:

ncspot prompts for a Spotify username and password on first launch, uses this to generate an OAuth token, and stores it to disk.

It's unclear whether this method supports Facebook/Google auth (presumably not?) and, if supported, how to use it.

It looks like external auth can be reset through the web player by attempting to login and using "reset password" with the external auth email, which took a bit of digging on the internet to figure out. The primary reason for filing this bug is that would be nice to know about limitations like this prior to install.

It's been a couple of years since I last used ncspot and coming back I was a little surprised that it took some internet sleuthing to get started.

I don't see any external docs linked from the README, please correct me if I missed anything.

hrkfdn commented 2 years ago

Hey, there used to be Facebook auth support, but then Facebook changed their auth flow. I think @medwards had a look at this a while ago. See also https://github.com/librespot-org/librespot/issues/754

gdesmott commented 1 year ago

What do you mean by Facebook/Google auth? It this the same thing as the Authorization Code Flow or that's yet another one?

medwards commented 1 year ago

It's the authorization code flow, Facebook/google auth is just a shorthand for a specific auth provider.

TLDR of the state of this: librespot provided help to do oauth authorization grant but it broke - Spotify API is different now. We'd have to reverse engineer the authorization flow part to know how to support it again in librespot. Until then librespot users should use a device password.

On Mon, Jan 2, 2023, 14:30 Guillaume Desmottes @.***> wrote:

What do you mean by Facebook/Google auth? It this the same thing as the Authorization Code Flow https://developer.spotify.com/documentation/general/guides/authorization/code-flow/ or that's yet another one?

— Reply to this email directly, view it on GitHub https://github.com/hrkfdn/ncspot/issues/829#issuecomment-1368948882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABZKZ23XAMXAPUATYYHNTWQLJ5TANCNFSM5YHFYEUA . You are receiving this because you were mentioned.Message ID: @.***>

gdesmott commented 1 year ago

Thanks, I wasn't sure if fb/google auth was actually different from Spotify's own OAuth mechanism or not.

rspotify does support all these flows that should be easy enough to do so in librespot as well.

I opened https://github.com/librespot-org/librespot/issues/1086 to discuss and clarify all this.