-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credential cache is ignored by default #1212
Comments
Thank you for raising this. I generally see your point. However, I would argue that for your specific use case, there are already several options that should all fix your problem.
Both solutions require you to somehow provide the username. If you don't want to put it directly in the config file, you can either use the workaround you posted or put it in a separate file and do a simple In theory, the third option you gave
should already be possible today, but currently doesn't work due to a bug, as I just noticed. (We're not caching credentials anymore.) As soon as that is fixed, you should just be able to put your username or the line you posted in your config and Would any of these suit your needs? |
Thank you for responding!
The keyring is indeed appropriate for this but it's not viable in every scenario. I use sway, rather than a desktop environment, so I don't actually have a keyring implementation available for now. It is also not suitable when running spotifyd as a system daemon (in embedded or server setups). As long as it's just one of the available options though, it is perfectly acceptable.
Yeah, the problem I have with that is, as I've explained, that the username isn't very good UX. It isn't the way most users log in, because it's a randomized and unchangeable string. I'm not strictly opposed to using it, but it would also be nicer not to have to hardcode it anywhere. As far as reading the cache with jq is concerned, I don't think it's the best long-term solution:
In general, I think the behavior of comparing the username from the command line or config file to the one in cache is also a bit confusing compared to an explicit option to use cached credentials.
I'm drifting a bit off-topic here, but is it possible to keep discovery enabled even when using explicit or cached credentials? |
Description
I do not store any credentials in my configuration file because I manage it in a public repo. Previously, starting spotifyd once with credentials on the command line would be enough to stay logged in permanently. It seems #1121 changed this behavior.
This is particularly annoying, because the "username" spotifyd expects is not the email address that is associated with my account, even though that is a valid way to log in. Additionally, spotify does not actually let you choose your username, so it has to be looked up (either from the cache file, or on the spotify website).
I rely on explicit login because I use the website (open.spotify.com) to control playback on my desktop machines. The website is unable to use zeroconf to discover spotifyd, so this forces me to use my phone to initiate the playback session.
A workaround is to use jq to read the username from the cache like so:
To Reproduce
Expected behavior
The change in behavior is a breaking change, hence this is filed as a bug and not a feature request. I don't particularly care to have it reverted, but one or more of the following solutions should be offered:
Logs
Click to show logs
Compilation flags
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: