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
tony
source
to share
1 answer
Ok. So I found the answer.
I did the following to get it to work
Enter the developer portal, search for the app and follow these steps.
Application Details> Apps Targeted to the Pay List List> Select Yes for Website
+1
tony
source
to share