gpt4 book ai didi

javascript - Linkedin OAuth 无法正常工作

转载 作者:行者123 更新时间:2023-11-28 06:53:51 25 4
gpt4 key购买 nike

我是 Ionic 新手。我正在为我的应用程序开发 linkedin 登录。对于 linkedin Oauth 2,我使用了 cordovaoauth 。它转到 linkedin 登录页面,但它给出了类似错误 - 客户端丢失或指定多次。

我的代码:

.controller('DashCtrl', function ($scope, $cordovaOauth) {
$scope.linkedinLogin = function () {
$cordovaOauth.linkedin('ClientId', 'clientSecret', ['https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=ClientId&redirect_url=http%3A%2F%2Flocalhost%3A8100%2Fauth%2Flinkedin&state=9898989898', 'r_basicprofile', 'r_emailaddress'], '9898989898').then(function (result) {
console.log("Response Object -> " + JSON.stringify(result));
alert(JSON.stringify(result));
}, function (error) {
console.log("Error -> " + error);
alert(error);
});

请帮助我

最佳答案

您收到错误是因为您包含了无效的范围:

https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=ClientId&redirect_url=http%3A%2F%2Flocalhost%3A8100%2Fauth%2Flinkedin&state=9898989898

从数组中删除它并重试。

最好,

关于javascript - Linkedin OAuth 无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32730947/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com