Open fotiDim opened 4 years ago
On further inspection, this seems like a bug report. If my redirect url is a universal link (https) then the underlying ASWebAuthenticationSession window never closes. Instead I am redirected to the webpage of my https url.
It seems that ASWebAuthenticationSession is misconfigured in the SDK.
On even further inspection 😅 it seems that this is an issue with ASWebAuthenticationSession. It just doesn't accept https://
callback URLs. I also found this entry in open radar.
It would be nice if somebody can confirm this and then we can close this issue since there is nothing that can be done about it.
The paradox is that when Spotify is installed https://
redirect URIs can be used just fine. Redirection works as expected. However when Spotify is not installed ASWebAuthenticationSession kicks in and it requires a custom URL scheme 👎
Perhaps we could document this in the ReadMe so other devs know what to expect.
@fotiDim I can confirm that I have the same issue here. I never get callbacks if I use .default
on initiateSession()
so I'm using .clientOnly
and it works fine. I haven't dig the problem so far but maybe it can confirm that this is a real issue.
I noticed that there is a
.default
option apart from.clientOnly
forsessionManager.initiateSession()
. I would like to know what exactly it is supposed to do. In the inline documentation it says:However AFAIK this SDK it useless without the Spotify app so how come authentication can be done using a web view?
I tried switching the
SPTLoginSampleAppSwift
sample app to.default
but authentication never succeeds if the Spotify app is not installed. If it is indeed installed, it will have the exact same behaviour as.clientOnly
so I wonder then what the purpose for it is.