简体   繁体   English

ASP.NET Facebook 登录 GetExternalLoginInfoAsync 总是返回 Null

[英]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.

相关问题 ASP.NET Web API Authentication.GetExternalLoginInfoAsync 始终返回 null - ASP.NET Web API Authentication.GetExternalLoginInfoAsync always return null ASP Identity GetExternalLoginInfoAsync始终返回null - ASP Identity GetExternalLoginInfoAsync always return null 当我尝试使用Facebook或Google登录时,GetExternalLoginInfoAsync始终返回null - GetExternalLoginInfoAsync always return null when i trying login using Facebook or Google GetExternalLoginInfoAsync在ASP.NET Core 2.0中返回null - GetExternalLoginInfoAsync returns null in asp.net core 2.0 HttpPostedFileBase始终返回null ASP.NET MVC 5 - HttpPostedFileBase always return null ASP.NET MVC 5 ASP.NET Core 2.0-配置[“ TestSecret”]始终返回null - ASP.NET Core 2.0 - Configuration[“TestSecret”] always return null IFormFile 在 asp.net core 2.1 中总是返回 null - IFormFile always return null in asp.net core 2.1 Asp.net MVC 2 Request.files [“”]始终返回null - Asp.net MVC 2 Request.files[“”] return null always GetExternalLoginInfoAsync()loginInfo返回null - GetExternalLoginInfoAsync() loginInfo return null Instagram OAuth GetExternalLoginInfoAsync在.NET Core 2.0中始终返回null - Instagram OAuth GetExternalLoginInfoAsync always returns null in .NET Core 2.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM