mosh-hamedani / vidly-mvc-5

956 stars 1.53k forks source link

Facebook Login does not work as expected #12

Open ghost opened 7 years ago

ghost commented 7 years ago

This does not work for me. I do not get redirected to the same page as you when I click the Facebook button..

Instead I stay on the same Login page, but the url changes from this:

https://localhost:44319/Account/Login

to

https://localhost:44319/Account/Login#_=_

Specifically here:

public async Task ExternalLoginCallback(string returnUrl) { var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();

loginInfo is null

Any help is appreciated.

vishnumallipudi commented 7 years ago

As far as I googled the same problem I suggest you update the Microsoft.Owin.Security.Facebook package in your nuget packages to v3.1.0 or Run this command in Package manager console Install-Package Microsoft.Owin.Security.Facebook. Because Facebook does not support Microsoft.Owin.Security.Facebook version 3.0.1 anymore. Updating the version worked for me. I hope this should work. For more info. follow this url: [http://stackoverflow.com/questions/22364442/asp-net-mvc5-owin-facebook-authentication-suddenly-not-working]

ghost commented 7 years ago

Thank you so much for solution vishnumallipudi . It took me 2 days to solve this. But actually it was 1 click solution. I appreciate !

pmk316 commented 7 years ago

This helped a lot. Thank You very much.

data2700 commented 7 years ago

A million thanks. I spent a lot of time trying to get this to work and your command solved it for me. Brilliant!