Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After kill the app - how can we refresh the token to avoid re-authorisation #42

Open
sathishchinniah04 opened this issue Jan 11, 2022 · 1 comment

Comments

@sathishchinniah04
Copy link

sathishchinniah04 commented Jan 11, 2022

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

@mjunkmyjunk
Copy link

mjunkmyjunk commented Feb 22, 2022

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)
          }
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants