Issue with Redirect URL when using react app + node on Heroku
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm developing an app using the Spotify API with a React from end running on localhost:3000 and a node back end running on localhost:8888. The back end takes care of the authentication, where my redirect url is localhost:8888/callback. This is fine in development because I will always know what port the backend is on, but when I deploy to Heroku, the back end port is chosen dynamically, so I can't enter a specific redirect url on my spotify dev page. How could I make it that this callback url is known before hand? My first thought was to make the the callback to my front end (the actual herokuapp link) and then redirect to the dynamically chosen port. Is there a better way?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page