mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #25] Token caching #18
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#18
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 @jsv93 on GitHub (Mar 18, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/25
Is it possible to add token caching similare to how Raspotify works?
When the user is using username and password to login, this can also be used to retrieve an access token which can be cached. I am aware that the user can provide an access token themselves, but I figured as the user is already providing the information required to retrieve an access token it would be nice to have it included as a feature.
I have go-librespot operating in a portable device, however each time the device is used I recieve an email notifying of the "new login". Zero-config circumvents this issue but my application does not always allow zero-config to be used.
Thanks again for an creating and awesome build. It has been working well in my application!
@devgianlu commented on GitHub (Mar 18, 2024):
This is already supported, after logging in successfully
go-librespotshould create a file calledcredentials.jsoncontaining the stored credentials that can be reused across restarts.If you enable debug logging you should see something about it.
@agneevX commented on GitHub (May 2, 2024):
@devgianlu after this file is created, how does one go about removing the plaintext credentials from
config.yml?@devgianlu commented on GitHub (May 2, 2024):
@agneevX After the file has been created you can remove the password field, the username field must stay in the config file as a sanity check that the credentials are for the correct user.
@agneevX commented on GitHub (May 2, 2024):
Fair @devgianlu, but I get this error when I do that:
@devgianlu commented on GitHub (May 2, 2024):
@agneevX That probably happens because
3163ntztuis6rybst2jgnosqcmfyis your device credential username. Try using that as your username once the credentials file has been generated.@agneevX commented on GitHub (May 2, 2024):
Thanks @devgianlu, that worked well. Is playback reporting a planned feature? Also it seems that initial volume steps feature is broken.
@devgianlu commented on GitHub (May 2, 2024):
It is eventually. Unlucky it is a very delicate topic that also requires a good amount of work to get done.
Please open another issue explaining the problem.