Add your Spotify / Streaming Account to the Pi Musicbox in a Secure Way With Device Passwords
In a recent article I wrote about the old Raspberry Pi, which serves its duty as my daily Web radio. The Pi MusicBox natively supports a bunch of streaming services, which improves the experience if you already have a streaming account, by providing your custom playlists on any HDMI capable hifi system. Unfortunately, the passwords are stored in plaintext, which is not a recommended practice for sensitive information. Especially if you use your Facebook credentials for services such as Spotify.
Most streaming services offer device passwords, which are restricted accounts where you can assign a dedicated username and password. Having separate credentials in the form of API keys for your devices is good practices, as it does not allow a thief to get hold of your actual account password, but only read access to your playlists. Also Spotify provides device passwords, but at the time of writing of this article, the assignment of new passwords simply did not work. A little googling revealed that the only possible way at the moment is using Facebook and its device passwords for the service. As Spotify uses Facebooks Authentication service, the services can exchange information about authorized users.
In the Settings, go to the Security panel and create a new password for apps. Name the app accordingly and provide a unique password.
Then, open the Pi MusicBox interface and add the Emailaddress you registered with facebook and provide the newly created app password.
You can then enjoy your playlists in a secure way. You will receive a warning about the connection, which is an indicator that it worked.