[英]ASP.NET Facebook Login GetExternalLoginInfoAsync Always Return Null
I have a ASP.NET MVC application.我有一个 ASP.NET MVC 应用程序。 I integrated it with Facebook.我将它与 Facebook 集成。 It works but here is a strange problem.它有效,但这是一个奇怪的问题。 If i open a incognito window it works.如果我打开一个隐身 window 它可以工作。 But it not works in normal window.但它不适用于正常的 window。 Could there be a cookie problem or?可能有cookie问题吗?
What's your suggest?你有什么建议?
//loginInfo is always null except incognito window
var loginInfo = await _authenticationManager.GetExternalLoginInfoAsync();
if (loginInfo == null)
{
return RedirectToRoute("UserLogin");
}
It seems that there already exists a local cookie containing authenticated information in the browser.似乎浏览器中已经存在一个包含经过身份验证的信息的本地 cookie。 It is recommended that we clear the locally stored browser data before testing the logic, and thus try it again.建议我们在测试逻辑前清除本地存储的浏览器数据,然后再试一次。
Feel free to let me know if there is anything I can help with如果有什么我可以帮助的,请随时告诉我
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.