开发者

server side linkedIn API authentication

开发者 https://www.devze.com 2023-03-27 03:59 出处:网络
We are building an enterprise application, and we are trying to integrate linkedIn API for authentication, but as I see in the linkedIn API developer, the authentication can be possible only from the

We are building an enterprise application, and we are trying to integrate linkedIn API for authentication, but as I see in the linkedIn API developer, the authentication can be possible only from the client side ... that is after I load the page, I can check whether there is a linkedIn session by making necessary calls as given i开发者_开发问答n the linkedIn API. But how do I do that same from the server itself, so that I can directly take the user to the home page?

Regards


Using the REST API, you can use LinkedIn for authentication, there are just a couple more steps you need to take.

Essentially, you need to get the user to initiate 'connecting' with LinkedIn from your application, have them authorize the application, and when they have, you can then store the returned user token locally if need be.

Once the user has authorized your application, and assuming you are using the LinkedIn 'authenticate' endpoint, returning users will see the following behavior on clicking the 'connect/sign-in' button: for users that currently have a valid session with LinkedIn, they will be returned immediately back to your site with their OAuth token. For those that have singed out of LinkedIn, they will need to sign-in first, then will be returned to your site with their token.

You can see this basic userflow on the Simple-LinkedIn demo page:

http://simplelinkedin.fiftymission.net/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号