authenticationmanager.getexternallogininfo()始终以linkedin返回null [英] authenticationmanager.getexternallogininfo() returns null always with linkedin

查看:97
本文介绍了authenticationmanager.getexternallogininfo()始终以linkedin返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MVC项目中使用了Oauth2.我们可以使用凭据成功连接到我们的应用,但是在验证用户身份后,外部登录回叫方法始终返回null.

I have used Oauth2 in my MVC project. We can connect successfully with our app with credentials but after authenticating user return always null in external login call back method.

检查了许多解决方案,但没有运气,但是另一个登录像Facebook一样工作正常.

Checked many solutions but no luck but another login is working fine like Facebook.

对于这种集成,我在应用程序中使用了Microsoft.Owin 4.0.0版本.

For this integration, I have used Microsoft.Owin 4.0.0 version in the application.

推荐答案

最后,我经过很长时间才得到解决方案.

Finally, I got the solutions after long time.

将此行添加到ConfigureAuth(IAppBuilder app)函数的Startup.cs文件中.与下面的代码相同.

Add this line in Startup.cs file of ConfigureAuth(IAppBuilder app) function. Same as per below code.

public void ConfigureAuth(IAppBuilder app)
{
      //Add this line at first inside the function.

      System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

      //Other code 

}

这篇关于authenticationmanager.getexternallogininfo()始终以linkedin返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆