ios-sdk
ios-sdk copied to clipboard
renewSession returns null for refreshToken
I have implemented Authorization Code Flow on iOS using Spotify iOS SDK v1.2.0. I have a backend service that does the refresh of the access token. To use this service I set tokenRefreshURL
on SPTSessionManager
. When a session has expired I call renewSession
on SPTSessionManager
. I get callback func sessionManager(manager: SPTSessionManager, didRenew session: SPTSession)
and the new SPTSession
is missing refresh token (I can see only accessToken
and expirationDate
). The session object on SPTSessionManager
is renewed so it is missing refresh token as well. How can I keep user authenticated if I don't get new refresh token? Any suggestions would be appreciated
Also if I can use the same refresh token, how can I set it? Because it seems there is no option to set refresh token on SPTSession.
@paleksandrs in which part of the documentation does it say how to setup your backend swap and refresh endpoints ?
@paleksandrs in which part of the documentation does it say how to setup your backend swap and refresh endpoints ?
https://developer.spotify.com/documentation/ios/guides/advanced-auth.md
I think there really need to be an option to set the refreshToken
parameter on SPTSession. Please implement this Spotify
Did you ever figure this out? I am running into the same issue!