When I deploy app on Surge and search for any song, Its show the error of Invalid Client URI. I changed the redirect uri both in Spotify.js and Spotify Application. I even tried http://localhost:3000/callback/ . I didn’t work either. If anyone can help, I will be thankful.
This are my 2 Cents.
I do not have the solution but I see the problem
I’ve changed the Redirect URIs to this http://thick-afternoon.surge.sh
This is the error message I’ve got from Spotify
You can see that the Redirect URIs is different. It has the old value I’ve used.
I believe Spotify Got stuck with the old value.
I fixed it.
I had to run “npm run build” again and it took my new “redirectUri” and worked.
To run surge I had to run npx surge.
I hope this helps!