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
Refresh token not firing automatically #11
Comments
OAuthSwiftRequestAdapter is for OAuth 1 There is no standards refresh token mechanism for OAuth1 But if you need you could implement your own |
Sorry, I forgot to mention that I was using OAuth2. I corrected the code, but still no automatically refresh on the token. Here is my updated code let sessionManager = SessionManager.default I think that I sill miss something... |
any log or error? there is a bug for some service #12 |
I've checked the workaround B and resolved my problem! I made an adaptation in order to save the token to the Keychain, and now is working great. Here is my code after that adaptation:
Thank you so much, for the framework and the support! |
good find that for calling renewAccessToken() externally, that unless you override and set client.credential.oauthToken to "" you get the following error calling renewAccessToken() requestError[Error Domain=OAuthSwiftError Code=401 "unauthorized_client Missing client_id()/client_secret() values" there are use cases to calling this function externally and it would be better to enable this in the library or at least document the workaround in the wiki Thanks |
Do I need to write some extra code to refresh my access token?
I have the following (Swift 4) code and it's not refreshing...
let sessionManager = SessionManager.default
sessionManager.adapter = OAuthSwiftRequestAdapter(AppDelegate.datalogOAuth)
sessionManager.retrier = OAuthSwiftRequestAdapter(AppDelegate.datalogOAuth) as? RequestRetrier
Thanks in advance
The text was updated successfully, but these errors were encountered: