Read the statement by Michael Teeuw here.
MMM-Spotify having trouble with authentification
-
I am trying to install the MMM-Spotify module onto my magic mirror. I follow the steps on the github page and everything seems to be working up until the authentication stage. The Spotify popup opens after I run the node first_auth.js command in the terminal, but when I click allow in the new webpage I get an error, “This site can’t be reached localhost refused to connect.” Any ideas on how to fix this, any help would be appreciated.
-
@Jack_Gregorski Are you using a free or premium account? The free account will not work. See https://github.com/skuethe/MMM-Spotify#restrictions
-
@Jack_Gregorski on the redirect url in the Spotify config did you use http://localhost:8888/callback
as per the readme?
that url should show on the error page
-
@Jack_Gregorski ok, i see the same thing…
workaround
change Spotify.js
fromline 249-250
let file = path.resolve(__dirname, this.config.TOKEN) let waitForFileTimeout = 0
to
let file = path.resolve(__dirname, this.config.TOKEN) let waitForFileTimeout = 60*1000
basically the code sets up the server to listen for the callback, but doesn’t wait for you to interact with the web page
opened issue
https://github.com/skuethe/MMM-Spotify/issues/192