对于某些试图通过Web View 中的移动设备通过OAuth2 API中的链接进行身份验证的用户,我们收到了这个奇怪的错误。

https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=XXX&state=XXX&redirect_uri=XXX&scope=r_emailaddress%20r_basicprofile

提交(https://www.linkedin.com/uas/oauth2/authorizedialog/submit)之后,将使用以下参数重定向到我们的重定向uri。
?error=server_error&error_description=XXX&state=the+authorization+server+encountered+an+unexpected+condition

我经历了这个=> http://chriskief.com/2014/04/23/linkedin-api-unable-to-retrieve-access-token/

创建新应用程序或生成新 key 是一个问题,因为它会破坏已安装应用程序的登录链接。我们以前从未使用过OAuth1。

最佳答案

在LinkedIn授权表单上在用户的电子邮件地址之前或之后添加空格字符,我们能够重现此错误。 LinkedIn不会在此字段上修剪任何多余的空格。

我的假设是,当人们使用空格键来接受电子邮件地址上的自动完成建议时,这种情况会在移动设备上发生。因此,用户开始输入其电子邮件地址,操作系统会推荐一个已知的电子邮件地址,通常,当按下空格键时,移动操作系统将使用该推荐。

09-10 02:24
查看更多