user3570412
user3570412

Reputation: 11

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

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

Upvotes: 0

Views: 291

Answers (2)

user3570412
user3570412

Reputation: 11

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

Upvotes: 1

iKenndac
iKenndac

Reputation: 18776

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.

Upvotes: 0

Related Questions