emorikawa / linkedin-oauth2

Ruby wrapper for the LinkedIn OAuth2 API
Other
70 stars 86 forks source link

Add support for tokens from the Mobile SDK #39

Open ushu opened 7 years ago

ushu commented 7 years ago

Hello,

this PR adds a new option called is_mobile_sdk to the contructor of LinkedIn::API. When turned on, this allows to contact LinkedIn with the tokens obtained through the Mobile SDK.

Basically, the usual approach to provide credentials (oauth2_access_token) does not work with these tokens, and you have to provide an "Authorization" header (+ a set of additional headers) to authenticate with the service.

We have this code running in Production with no issue.