nxtbgthng / OAuth2Client

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

Dirty fix for oauth with LinkedIn, which requires full request URI in PO... #94

Closed igorglotov closed 10 years ago

igorglotov commented 10 years ago

Dirty fix for oauth with LinkedIn (https://developer.linkedin.com/documents/authentication, probably others), which requires full request URI in POST for auth token. This is ugly code but it works and I think you will fix it somehow. It's okay to decline it.

stigi commented 10 years ago

This is truly dirty ;)

Would you consider adding a toggle to enable that behavior?
Also I'd suggest using the -nxoauth2_URLByAddingParameters: method from NSURL+NXOAuth2.

airdrummingfool commented 10 years ago

I had the same issue with LinkedIn. Turns out that they take GET requests for auth too, so all I did is override that method and set the tokenRequest HTTPMethod to @"GET". Ideally, the request method would be settable somewhere.

airdrummingfool commented 10 years ago

See PR #111 for my attempt at making the HTTPMethod customizable.

toto commented 10 years ago

As #11 was merged I guess this is obsolete now.