Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Temporary fix for handling a user denying access for oauth #96

Closed
wants to merge 2 commits into from

Conversation

mikekey
Copy link

@mikekey mikekey commented Oct 29, 2013

I'm not sure if this is a good fix for the whole of the library nor if its even needed. The spec doesn't say much about how to deal with this issue other than the fact that on a deny there will be no verifier. I patched this to handle a crash that was occurring when a user denied access during testing. Hopefully its useful.

@mattt
Copy link
Contributor

mattt commented Nov 18, 2013

Thanks for your PR, @mikekey. Could you describe exactly what kind of crash you were experiencing?

As far as the patch itself, this isn't really how NSError should be used, so this can't be merged as-is. If we can get to the bottom of what the behavior should be, I'd be happy to work with you to come up with the right fix.

@mattt mattt closed this Nov 18, 2013
@mikekey
Copy link
Author

mikekey commented Nov 19, 2013

Yes, I was not suggesting this was the correct fix by any means. The issue is that in a case where the authorization presented to a user is not approved by the user, there will be no verifier to parse from the query string. Without the fix the app will crash. This just ensures it doesn't crash and attempts to log the failure to the caller.

More specifically in my situation we present the user with a screen that has an Accept and Deny button. If they select Deny the entire app crashes where I added the code in this PR.

I don't think this is a very common use case, I just figured it may be useful to flag for anyone else who may come across it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants