Javascript hello.js oauth至linkedin-heroku代理错误或不正确的应用程序定义

Javascript hello.js oauth至linkedin-heroku代理错误或不正确的应用程序定义,javascript,oauth,oauth-2.0,linkedin,hello.js,Javascript,Oauth,Oauth 2.0,Linkedin,Hello.js,早上好 我正在尝试用hello.js创建一个“通过LinkedIn登录”按钮。我使用了以下示例:。一切正常,我可以登录LinkedIn 现在我正在尝试更改第25行中LINKEDIN_CLIENT_ID的值。 此常量在client_ids.js中定义,其值为“bixrjszkfk0j”。这是hello.js LinkedIn应用程序的API密钥。我需要将其更改为LinkedIn上应用程序的API密钥 当我更改密钥时,我无法登录。我可以在LinkedIn上看到我的应用程序提示:“Test2希望访问你

早上好

我正在尝试用hello.js创建一个“通过LinkedIn登录”按钮。我使用了以下示例:。一切正常,我可以登录LinkedIn

现在我正在尝试更改第25行中LINKEDIN_CLIENT_ID的值。 此常量在client_ids.js中定义,其值为“bixrjszkfk0j”。这是hello.js LinkedIn应用程序的API密钥。我需要将其更改为LinkedIn上应用程序的API密钥

当我更改密钥时,我无法登录。我可以在LinkedIn上看到我的应用程序提示:“Test2希望访问你的LinkedIn信息”,但LinkedIn阻止成功登录此应用程序

因为我刚刚更改了API密钥,所以问题应该在LinkedIn上我的应用程序的定义中,而不是代码中

这是LinkedIn上我的应用程序定义中的图像:

更多信息:

使用hello.js应用程序的API键,我看到登录后,该值被设置为浏览器的本地存储(Ubuntu 13.04上的Chrome 28):

对于我的API密钥,我在本地存储中得到了以下结果:

{
"linkedin":{
    "error":{
        "code":"required_credentials",
        "message":"Could not find the credentials for signing this request, ensure that the correct client_id is passed"
    },
    "error_message":"Could not find the credentials for signing this request, ensure that the correct client_id is passed",
    "state":"",
    "client_id":"77j96nqcybx2hg",
    "network":"linkedin",
    "display":"popup",
    "oauth_proxy":"https://auth-server.herokuapp.com/proxy",
    "scope":["basic"],
    "oauth":{
        "version":2,
        "auth":"https://www.linkedin.com/uas/oauth2/authorization",
        "grant":"https://www.linkedin.com/uas/oauth2/accessToken"
    }
}
}
我还检查了我的Apache access.log。在这两种情况下,我都会收到如下请求:

对于hello.js应用程序:

http://myhost.abc/dl/aa/b.html?code=AQT7xj4N22o7hGQhnB2kuBD7pet7CM8YF9IYEckbcTMbxVRxKykxBZdZAUmtuOz9UjHYnqE7t8am4A9aMjLCeu2FBZjL3yEp_SG_ks3qal8TFOoW5Hs&state={"client_id":"bixrjszkfk0j","network":"linkedin","display":"popup","callback":"_hellojs_44aevwkw","state":"","oauth_proxy":"https://auth-server.herokuapp.com/proxy","scope":["basic"],"oauth":{"version":2,"auth":"https://www.linkedin.com/uas/oauth2/authorization","grant":"https://www.linkedin.com/uas/oauth2/accessToken"}}
对于我的应用程序:

http://myhost.abc/dl/aa/b.html?code=AQROQFhP2BawiylIN1Oz3qNVqodrABXExHOtX_gd_WXhqK7rAoWpR5cbNZBdWpkijh6iKfXiP3lwTodrpADm270H9Uuu5jSk6WOCOV-dB-3YkIyf7i0&state={"client_id":"77j96nqcybx2hg","network":"linkedin","display":"popup","callback":"_hellojs_3l93c9ah","state":"","oauth_proxy":"https://auth-server.herokuapp.com/proxy","scope":["basic"],"oauth":{"version":2,"auth":"https://www.linkedin.com/uas/oauth2/authorization","grant":"https://www.linkedin.com/uas/oauth2/accessToken"}}
此外,在我LinkedIn帐户中的授权外部应用程序列表中,我可以看到“Test2”和“HelloJS OAuth2”。因此,我的结论是,我的应用程序(Test2)已成功登录。hello.js heroku代理应用程序有问题吗?或者我应该更改我的应用程序定义中的某些内容


谢谢

向客户端OAuth1流注册你的应用程序密钥和密码,不幸的是,客户端OAuth1流仍然需要服务器端代理进行身份验证和授权,因为他们无法保证机密的安全。

你向注册了你的应用程序密钥和密码吗?谢谢@Drew,你在1天后救了我!
http://myhost.abc/dl/aa/b.html?code=AQROQFhP2BawiylIN1Oz3qNVqodrABXExHOtX_gd_WXhqK7rAoWpR5cbNZBdWpkijh6iKfXiP3lwTodrpADm270H9Uuu5jSk6WOCOV-dB-3YkIyf7i0&state={"client_id":"77j96nqcybx2hg","network":"linkedin","display":"popup","callback":"_hellojs_3l93c9ah","state":"","oauth_proxy":"https://auth-server.herokuapp.com/proxy","scope":["basic"],"oauth":{"version":2,"auth":"https://www.linkedin.com/uas/oauth2/authorization","grant":"https://www.linkedin.com/uas/oauth2/accessToken"}}