StravaSwift
StravaSwift copied to clipboard
After kill the app - how can we refresh the token to avoid re-authorisation
At first time all good, after we kill the app and relaunch every-time its asking for authorisation. Is there any way to re-authorise by having the previous token ?
Tried :
public func refreshAccessToken(_ refreshToken: String, result: @escaping AuthorizationHandler) {}
But not getting the result of OAuthToken
This is how I'm using the refreshAccessToken
StravaClient.sharedInstance.refreshAccessToken(sRefreshToken) { result in
switch result {
case .success(let token):
let accessToken = token.accessToken
let refreshToken = token.refreshToken
case .failure(let error):
debugPrint(error)
}
}