mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1085] Support token configuration from file system. #506
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#506
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 @GiviMAD on GitHub (Dec 28, 2022).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1085
Hi, awesome project, just discovered it after thinking there were no replacement for libspotify.
Will be possible to support providing a Spotify token from the filesystem?
I have a web application and I would like to use librespot to enable Spotify support when running on desktop through electron (when running on web I use the Spotify Web SDK). So I already have a valid spotify token on the client.
My question is, is it possible to add support in librespot to just gather a token from a file and forget about any authentication just assuming it will always have a valid token there?
Another possibility that will solve my "problem", will be supporting creating the credentials cache file programmatically with a valid refresh token and auth_type 3.
Do you think any of these alternatives can be considered? Or maybe I have a better way to do it that I'm just missing.
Thank you in advance for the help!
@roderickvd commented on GitHub (Dec 28, 2022):
Not sure what you mean, how would that be different from putting the token you got externally in librespot's cache file?
I don't know whether tokens from the web client are interchangeable with tokens used to authenticate over Mercury.
@GiviMAD commented on GitHub (Dec 28, 2022):
Hi, thank you for the quick response.
I already tried to put the auth_type to 3 , and put in the auth_data field my Spotify token in base64, also tried with the refresh token, without luck.
So maybe you are right and the token is not valid, I didn't know about Mercury at all.
@roderickvd commented on GitHub (Dec 30, 2022):
You think we can close this then?
@GiviMAD commented on GitHub (Dec 31, 2022):
yes, ty!