AuthenticationManager.GetExternalLoginInfoAsync () returns null after nuget update
After updating the nuget packages of my MVC5 app (which is working correctly so far) Authentication Manager which is used to verify that my Facebook users now always return null.
I am developing my solution in visual studio 2012 and using the latest webtools.
[AllowAnonymous]
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
if (loginInfo == null)
{
return RedirectToAction("Login");
}
}
After googling, I found that the Facebook API was changed, but there is no solution on how to get nuget pacakages working with an MVC5 app. Please help me how to do this again.
I tried the following, but the request returned from facebook is always null.
Adding
<system.web><authentication mode="None" /></system.web>
<system.webServer><modules><remove name="FormsAuthentication" /></modules></system.webServer>
Setting up
HttpContext.GetOwinContext().Response.Cookies.Append("OwinCookie", "SomeValue");
HttpContext.Response.Cookies["ASPCookie"].Value = "SomeValue";
HttpContext.Response.Cookies.Remove("ASPCookie");
+3
source to share