加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 使用linkedin验证应用程序时出错

发布时间:2020-12-15 22:24:05 所属栏目:百科 来源:网络整理
导读:我在尝试使用LinkedIn进行身份验证时遇到以下错误. “无效的重定向URI” 该链接有效,并在开发者网站链接中的我的应用程序中注册. 什么可能导致此错误? var auth = new OAuth2Authenticator ( clientId: "MYID",scope: "r_basicprofile",authorizeUrl: new U
我在尝试使用LinkedIn进行身份验证时遇到以下错误.
“无效的重定向URI”

该链接有效,并在开发者网站链接中的我的应用程序中注册.

什么可能导致此错误?

var auth = new OAuth2Authenticator
  (
     clientId: "MYID",scope: "r_basicprofile",authorizeUrl: new Uri("https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MYID&redirect_uri=https://wicareerpathways.org/&state=987654321&scope=r_basicprofile"),redirectUrl: new Uri("https://wicareerpathways.org/")
  );

解决方法

试试这个:

var auth = new OAuth2Authenticator (
                clientId: "**",clientSecret:"**",scope: "r_fullprofile r_contactinfo",authorizeUrl: new Uri ("https://www.linkedin.com/uas/oauth2/authorization"),redirectUrl: new Uri ("http://www.***.co.nz/"),accessTokenUrl:new Uri("https://www.linkedin.com/uas/oauth2/accessToken")    
            );

参考:
https://forums.xamarin.com/discussion/comment/49244/#Comment_49244

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读