mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #417] Auth code flow, redirect server. #140
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @blueforesticarus on GitHub (May 26, 2023).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/417
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_tokenbut 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 on GitHub (May 26, 2023):
I think this issue is similar with this discussion: https://github.com/ramsayleung/rspotify/discussions/365
@github-actions[bot] commented on GitHub (Nov 23, 2023):
Message to comment on stale issues. If none provided, will not mark issues stale
@gdesmott commented on GitHub (Dec 27, 2024):
librespot-oauthis doing exactly that: https://github.com/librespot-org/librespot/blob/dev/oauth/src/lib.rs@ramsayleung commented on GitHub (Jan 5, 2025):
Closing this ticket as this feature has been implemented in this PR: https://github.com/ramsayleung/rspotify/pull/513