LinkedIn grant access screen showing even though user already authenticated

倾然丶 夕夏残阳落幕 提交于 2019-12-11 10:33:34

问题


I'm using an external Node.js module, everyauth, to handle my LinkedIn API authentication. I'm not yet positive if this is a problem with the way my module handles their API, or some other API issue itself.

Basically, after a user has already granted access, LinkedIn nevertheless continues to ask whether to continue to grant access. I know this is not standard because I've seen a different user flow in other applications.

Here's an example of what happens:

You can see I granted access on Jan 11th, but this was taken on Jan 13th. Why must I re-auth!?

Do you have any idea what is causing this? I dove into the relevant LinkedIn module code for everyauth but nothing in that application flow caught my eye as the problem.


回答1:


Modify the script to send them to https://www.linkedin.com/uas/oauth/authenticate instead of https://www.linkedin.com/uas/oauth/authorize.

That will cause LinkedIn to automatically redirect them back to your site.

See more at https://developer.linkedin.com/documents/linkedins-oauth-details




回答2:


If you are using the JavaScript API (which it looks like everyauth uses), then it is likely that the OAuth tokens that LinkedIn stores in the browser have become 'stale'. To ensure that the user is the correct user, the browser tokens expire after ~30 minutes.

That being said, if the session is still fresh and the authorize value is set to true, you should be able to bypass the screen you are seeing.

https://developer.linkedin.com/documents/overview



来源:https://stackoverflow.com/questions/8858082/linkedin-grant-access-screen-showing-even-though-user-already-authenticated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!