Spotify iOS SDK returns authenticationFailed when I externally host my token exchange service

StackOverflow https://stackoverflow.com/questions/23278388

  •  09-07-2023
  •  | 
  •  

Question

I am attempting to prototype the spotify service running in iOS using the Spotify SDK (Beta). From the tutorial I run the Token Exchange Service for oath and this works fine on the simulator.

When I attempt to run this on device from a remote host the authentication fails. Is there anything I can do to get this working or at least understand why it does not?

I see there is no spotify email contact so posting this on stack flow and hoping for the best.

Cheers

Was it helpful?

Solution

So I got this working. Basically found a python version of the token exchange service which worked. Somehow the ruby version just didn't work even when modified for remote hosting.

Here is the link for anyone else in the future. https://github.com/plamere/spotify_token_swap/blob/master/spotify_token_swap.py

OTHER TIPS

Are you running on the service on localhost? If so, when running on your device, localhost is the device itself and since your token exchange service isn't running on the device as well, it won't work.

You need to host your token exchange service somewhere accessible by both your Mac and your device using the same address, such as a publicly accessible web server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top