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.
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.