使用linkedin对应用程序进行身份验证时出错
问题描述:
在尝试使用LinkedIn进行身份验证时,出现以下错误。 “无效的重定向URI”使用linkedin对应用程序进行身份验证时出错
该链接有效,并在我的应用程序中注册到开发人员站点中的链接中。
什么可能导致此错误?
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
答
在authorizeUrl编码REDIRECT_URL参数尝试URL - >
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MYID&redirect_uri=https%3A%2F%2Fwicareerpathways.org%2F&state=987654321&scope=r_basicprofile
+0
我尝试将uri更改为url,并且我得到了闪烁数十次的不同错误。身份验证错误 - “您通过了=”response_type“+ more + than + once + this + can + only + apear + once。” – CsharpBeginner
当你得到的错误在实例化一个新的实例之后..?您是否看过LinkedIn api /文档[LinkedIn开发者支持](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwi2-K7pkNzJAhWEVD4KHddQDR8QFggoMAI&url=https %3A%2F%2Fdeveloper.linkedin.com%2Fsupport&usg = AFQjCNFChuuBYxo9LL8iItRSIIceDhyQtA&sig2 = BkGPrWTzomznJlQoOhPj4A&bvm = bv.109910813,d.eWE) – MethodMan