MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Spotify having trouble with authentification

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    7 Posts 5 Posters 1.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FoziF Offline
      Fozi Project Sponsor @Jack_Gregorski
      last edited by

      @Jack_Gregorski Are you using a free or premium account? The free account will not work. See https://github.com/skuethe/MMM-Spotify#restrictions

      HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

      1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Jack_Gregorski
        last edited by sdetweil

        @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

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Jack_Gregorski
          last edited by sdetweil

          @Jack_Gregorski ok, i see the same thing…

          workaround
          change Spotify.js
          from

          line 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

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • K Offline
            kinggiotai
            last edited by

            @Jack_Gregorski said in 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.

            S 2 Replies Last reply Reply Quote 0
            • S Offline
              sdetweil @kinggiotai
              last edited by

              @kinggiotai can you tell which module you are using

              git remote -v

              in the module folder will tell the source repository

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @kinggiotai
                last edited by sdetweil

                @kinggiotai did you setup the spotify.config.json from the

                auth callback example?

                [
                  {
                      "USERNAME": "A_NAME_TO_IDENTIFY_YOUR_ACCOUNT",
                      "CLIENT_ID": "PUT_YOUR_SPOTIFY_APP_CLIENT_ID",
                      "CLIENT_SECRET": "PUT_YOUR_SPOTIFY_APP_CLIENT_SECRET",
                      "TOKEN": "./USERNAME_token.json",
                      "AUTH_DOMAIN": "http://YOUR_DEVICES_IP",
                      "AUTH_PORT": "8889"
                  }
                ]
                

                I had to do that just now

                the domain/port MUST match the callback address in the spotify app config
                from my app config

                callback
                http://localhost:8100/callback
                

                json file strings to match
                domain is http://localhost
                port is 8100

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy