Creating Spotify Playlists with Terraform: Overcoming Spotify’s OAuth Update

Spotify recently made a change to its OAuth policy — they no longer allow http://localhost as a redirect URI for authentication flows . For developers working locally, this caused quite a disruption, especially for tools relying on OAuth like the Terraform Spotify provider. Learn more What’s the Problem? The original Spotify Auth Proxy server ( written in Go by Conrad Ludgate ) had the redirect URI as http://localhost . Since Spotify now blocks this URI for security reasons, anyone trying to authenticate would hit an INVALID_CLIENT: Invalid redirect URI error. This effectively broke the Terraform Spotify provider’s authentication flow. The Workaround: Use 127.0.0.1 Instead of localhost Spotify still allows redirect URIs using the IP loopback address 127.0.0.1 with HTTP, so the trick is to replace http://localhost with http://127.0.0.1 . They behave the same for local testing but Spotify accepts only the latter now. My Solution: Rebuild the Auth Proxy in JavaScript While I ...