Sign in with Linkedin doesn't trigger callback on iOS Safari when using the JS API

核能气质少年 提交于 2020-01-11 08:19:15

问题


I'm using SignIn with Linkedin on a website, via the JS API. It works fine on the few desktop browsers I've tested (Chrome and FF on Windows, Safari on MacOS), and on a slightly outdated Android Chrome. But it fails on iOS Safari (I use iOS 7).

The issue is that on iOS Safari, the callback passed as argument to IN.User.authorize is not executed.

The line looks like this: IN.User.authorize(this._getProfileData, this);

_getProfileData is executed on the desktop browsers mentioned above and Android Chrome, but not iOS Safari.

This issue can even be reproduced without iOS: via Chrome's developer tools, in device mode for iPhones and iPads.

Any clues?


回答1:


Unfortunately, LinkedIn's JS SDK is incompatible with iOS 5+ due to the way that Javascript is paused during cross-window communication processes. You will need to fall back to server-side REST calls to ensure 100% platform compatibility.




回答2:


Since the 1st of May 2019 this is no longer working : https://engineering.linkedin.com/blog/2018/12/developer-program-updates

Sign In with LinkedIn: Sign In with LinkedIn enables members to choose a more convenient way to log-in to third party apps and allows those apps to learn more about their new user. This API will only recognize a new “Lite Profile” permission, which supports a reduced set of member profile fields. See the documentation for more details.

and

SDKs: Our JavaScript and Mobile Software Development Kits (SDKs) will stop working. Developers will need to migrate to using OAuth 2.0 directly from their apps.



来源:https://stackoverflow.com/questions/29230820/sign-in-with-linkedin-doesnt-trigger-callback-on-ios-safari-when-using-the-js-a

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