Display a VR compatibale Spotify in-game remote in a Microsoft Flight Simulator 2020 toolbar panel.
Spotify Panel will run in the system tray. Right click on the system tray icon to show or close the server application. Additionaly, you may double-click on the system tray icon to show it. Once Spotify Panel is configured with your Spotify developer keys, subsequent launches of Spotify Panel will load minimized into the system tray. After entering your Spotify developer keys, Spotify Panel will open an embedded browser in order for you to authenticate and give permissions for it to pull information from your Spotify account. After that, refreshing the token should happen without any user intervention.
Q. MSFS 2020 panels use HTML natively. Why do I need a server application?
A. MSFS 2020 uses iFrames in their panels to serve up HTML. While this would be ideal, Spotify, in their infinite wisdom, has decided to prevent authentication from within iFrames. Perhaps someone smarter than me can explain the security concern they have.
Q. Why do I need to provide my Secret ID as well as my Client ID?
A. By default Spotify authentication will pass the authorization token back to your web browser via a URL hash. Because we can't authenticate from within MSFS, because of the aforementioned iFrame issue, we have to get the authentication from a URL parameter. Since URL hashes are not visible to the server we must provice the Secret ID so that Spotify passes the token back as a standard URL parameter.
Q. What port does Spotify Panel use?
A. 5150
Q. If I forward port 5150 from my router and open an incoming firewall rule, can an external browser access my data?
A. No. Binding is to localhost (127.0.0.1) only.