ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
639 stars 123 forks source link

Auth code flow, redirect server. #417

Open blueforesticarus opened 1 year ago

blueforesticarus commented 1 year ago

Is your feature request related to a problem? Please describe. In the auth code flow, it is inconvenient have to paste the redirect url in the terminal. This is obviously an issue if the program might not be run in a interactive shell.

Describe the solution you'd like A convenience method like prompt_for_token but which spins up a local server listening to the redirect url, using it to get the code semi-automatically. Ideally should take allow multible redirect_urls (which spotify supports) as fallback (in case port is in use, for example). prompt_for_token could be used as a final fallback.

Describe alternatives you've considered The obvious solution is to implement the above in my own code. However, I believe it is a common enough use-case to justify putting a convenience method in rspotify. Why have everyone duplicating effort.

Additional context Willing to implement this (I will have to do it for my program anyway.) Open to suggestions on what http server crate to use.

ramsayleung commented 1 year ago

I think this issue is similar with this discussion: https://github.com/ramsayleung/rspotify/discussions/365

github-actions[bot] commented 11 months ago

Message to comment on stale issues. If none provided, will not mark issues stale