Reputation: 45
How to implement native auth with Spotify iOS SDK? I don't want to see popup window of Spotify login as it is currently implemented.
Or is it possible using Web API?
I look at the app called "SoundFocus" on App Store - their Spotify auth screen looks like native - I need to do the same. How to do it?
Thank you
Upvotes: 0
Views: 404
Reputation: 26
At the moment fully native login is not supported with the SDK:s. SoundFocus is probably using an older API (like libSpotify). You should implement your own backend service (Authorization Code flow) as outlined in the documents here: https://developer.spotify.com/web-api/authorization-guide/
This method is suitable for long-running applications which the user logs into once. It provides an access token that can be refreshed. Since the token exchange involves sending your secret key, this should happen on a secure location, like a backend service, not from a client like a browser or mobile apps. This flow is described in RFC-6749.
Upvotes: 1