-
Notifications
You must be signed in to change notification settings - Fork 217
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
Refreshing the access token. #38
Comments
Ah, I just found a section of code commented out with the reason... TODO: check for status code once the bug returning 500 is fixed Could you possibly shed some light on this? Thanks |
Can you tell me which services you are using OAuth? Some services (e.g. Yammer, Google) serve the refresh token in wired ways, so that it will not be parsed correctly. I usually overload the access token parser via a category in that case. Here is an example that works for Yammer |
The OAuth service is an in house one. I've just found the problem. In the section I mentioned above...
in NXOAuth2Connection The authenticationHeader was null as I wasn't getting back the 401 error reason (expired_token) from the server. We are now writing that into the return error so hopefully this should be resolved. If it doesn't fix it I'll let you know. Thanks for the reply. Oliver |
@ojfoggin Also please let us know if it does fix it ;) |
Hi again, Yes, that worked perfectly. Thanks Although, I have found something else that didn't quite work but I'll add a new issue for this as it's not really related. |
Hi,
I'm writing an iOS app using this framework (installed through CocoaPods which is brilliant!)
I'm using the username/password flow and it works with no problems when the access_token is still valid.
I'm running the requests using [NXOAuth2Request performMethod:...] and I've followed through to see that this has built in token refreshing in it (i.e. if the token isn't valid it will try to refresh and try the connection again).
However, this isn't working for me all the time.
I've got the requests in an operation queue and I get a 401 error back. (Once the access token expires)
If I then restart the synchronisation process it will try to send the oauth refresh first. and then carry on with the sync.
Is this something that is know? I'm about to go code trawling to see if I can find the cause of this.
Thanks
The text was updated successfully, but these errors were encountered: