How to update the Linkedin oauth token if the user has allowed the application through oauth2 authorization?

I need to update the access token associated with access without having to repeat the initial authorization process. I also looked at this documentation http://developer.linkedin.com/documents/exchange-jsapi-tokens-rest-api-oauth-tokens , but it doesn’t work because my users authorize the application through regular OAuth, and the article uses JS OAuth. (Not sure if there is a difference between the two processes, and if there is a difference between the access tokens received from each process). Despite the fact that I am already registered on a different tab in the same browser, it always offers me to log in to LinkedIn.

If I try to use IN.User.isAuthorized (), it returns false, although I have logged in to LinkedIn and I cannot update the token.

If I pass the LinkedIn access token from my server to JS, and the LinkedIn user ID IN.User.isAuthorized () always returns true, even when I'm not registered

So I'm trying to ask if there is a way to update the user associated with the thorguh JS token when the user is logged in to connect with the same browser, how can we do for facebook? So what's this?

+4
source share
1 answer

You cannot update a token without a member participating in your application.

If you want to update the token, the member must be there, and you need to send them through the authorization page. If they are logged in to LinkedIn, it will be a smooth update and we will redirect the page to your application.

+1
source

Source: https://habr.com/ru/post/1500786/


All Articles