Skip to content

Check to see if a 403 is returned when app credentials have been revoked. #4

Open
jyap808 opened this Issue Oct 11, 2012 · 2 comments

2 participants

@jyap808
jyap808 commented Oct 11, 2012

Error when trying to fetch a posts in the timeline.

Failure: Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 403" UserInfo=0x7166ea0 {NSLocalizedRecoverySuggestion=Invalid MAC Signature, AFNetworkingOperationFailingURLRequestErrorKey=, NSErrorFailingURLKey=https://jyap.tent.is/tent/posts, NSLocalizedDescription=Expected status code in (200-299), got 403, AFNetworkingOperationFailingURLResponseErrorKey=}

@followben
Owner

Hi Julian - I've been thinking how best to handle this and have something in the works.

The plan is to stash the request, ask for re-auth, then resubmit on receiving the handle back from the tent server, and for this same flow to happen every time we get a 403. Might have a -shouldAuthorizeAfterUnauthorizedResponse: as a hook for when clients want to do something different.

Would that work for you?

@jyap808
jyap808 commented Oct 12, 2012

Yes that makes sense. The scenario that 'an app can be revoked at any time' and 'a user can perform any action that would result in a 403' would need to be covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.