Skip to content
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

Spotify Password Authentication Deprecated #12

Closed
goshansp opened this issue Aug 16, 2024 · 3 comments
Closed

Spotify Password Authentication Deprecated #12

goshansp opened this issue Aug 16, 2024 · 3 comments

Comments

@goshansp
Copy link

Password authentication for Spotify has been deprecated and it's not working anymore with:

[Error] (librespot) could not initialize spirc: Permission denied { Login failed with reason: Bad credentials }

It seems that Snapcast needs to switch to token-based authentication and hence we'll require this container to handle the API token variable and documentation requires update.

@goshansp
Copy link
Author

The workaround is moving to Zeroconf as mentioned here :

  • remove SPOTIFY_USERNAME and 'SPOTIFY_PASSWORD from container runtime (as shown in command below)
  • remove SPOTIFY_USERNAME and 'SPOTIFY_PASSWORD from snapserver.conf
  • move container to host network i.e. for podman run add --network=host

Full command that is working for me
$ podman run -p '1704-1705:1704-1705' -p '1780:1780' -p '3689:3689' -p '6000-6009:6000-6009/udp' -p '5353:5353' -p '443:443' -e 'SPOTIFY_CONFIG_ENABLED=1' -v 'snapcast-config:/app/config/' --name snapcast --rm --network=host ghcr.io/firefrei/snapcast/server:latest

@firefrei
Copy link
Owner

PR #10 already changed SPOTIFY_USERNAME and SPOTIFY_PASSWORD to optional variables. So you can just leave them empty/unconfigured, and librespot will operate in zeroconf mode by default. Therefore, your Spotify app client needs to be in the same L2 subnet - as you mentioned by --network=host.
However, the fix was not yet included in the latest image tag, only in the dev. I have pushed a new latest version now.

@goshansp
Copy link
Author

Great work, thank you so much! I was not aware of Zeroconf before the deprecation and it fits my use case much better. The family loves it! I cannot think of a reason to switch back to username and password. Please re-open if you disagree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants