tvillarete / ipod-classic-js

An iPod Classic emulator that connects to Apple Music and Spotify. Built with React & Styled Components

Home Page:http://tannerv.com/ipod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Non-localhost URL / Spotify API Server Source

Piers-Walter opened this issue · comments

Hi, I'm trying to get this to work with Spotify on a URL which isn't localhost:3000 but instead bundled inside a Cordova application which you can see on my GitHub here.

When the /callback request to the ngrok server goes off it seems to always return a 404 even if no request with the spotify-provided code and state has been sent yet. I'm guessing the ngrok server only allows requests from localhost:3000 and tannerv.com? If this is the case would it be possible to get the source code for the Spotify auth server so we can host our own implementations?

Thanks, Piers

Hey @Piers-Walter, that is correct – for security purposes Spotify requires that you whitelist specific callback urls, and localhost:3000 and tannerv.com are currently the only two whitelisted ones.

I actually used Spotify's Authorization Code Flow example code on their GitHub, which only required a few adjustments to work with my particular urls. Give it a try, and let me know if I can clarify anything else.

Neat project by the way; keep me posted on your progress!

how did you manage to configure locally?