nxtbgthng / OAuth2Client

Client library for OAuth2 (currently built against draft 10 of the OAuth2 spec)
855 stars 217 forks source link

Add error parameter for handling redirect URLs #186

Closed orkoden closed 9 years ago

orkoden commented 9 years ago

-[NXOAuth2AccountStore handleRedirectURL:] returns a BOOL and a NSError is created further down in -[NXOAuth2Client openRedirectURL:] if the redirect URL contains an error. The way to get the error is to listen to a notification.

It's more obvious how to get the error if a (NSError**) error parameter is passed in. This also conforms to the pattern recommended by Apple. Nothing is asynchronous, so a notification is not necessary. I left the notification in however.

When I checked out NXOAuth2 I didn't immediately understand what to do with the redirect URL, so I emphasized that in the README.

toto commented 9 years ago

Very nice, esp. that you kept interface compatibility :-)