I am going through a tutorial to implement facebook social log in my sample web site. Below are the steps I did.
Behavour: Now when I run my application from local host (https) and click Register then I see the facebook sign in button. Also when I click that button a facebook pop up comes with "Sample App" wants to access your facebook data. So far so good. But as I say YES to it nothing happens after that. I get redirected to the log in page. and the URL is https://localhost:44393/Account/Login#_=_
Expected Behaviour: For the tutorial that I am following after doing above steps one message comes on tutors screen as "Facebook has authenticated.... Enter you email to continue". Something like this. Can some one please guide me here why I am not getting same message and why I am not able to use social log in. I have tried to follow all the steps.
Expected Screenshot from tutorial

Is there any other steps I need to do in facebook developer dashboard?
EDIT 1 :
In the facebook developer dashboard for my app in the Facbook Login Tab->Settings : I see below message.

EDIT 2: I debugged and found that returnURL is null when I click on facebook log in button.
[AllowAnonymous]
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
if (loginInfo == null)
{
return RedirectToAction("Login");
}
// Sign in the user with this external login provider if the user already has a login
var result = await SignInManager.ExternalSignInAsync(loginInfo, isPersistent: false);
Ok, After research I found out that I need to install package Install-Package Microsoft.Owin.Security.Facebook from nuget package manager. After this everything worked fine.
Simply update the Windows.Owin.Security.Facebook to latest version(3.1.0) further in facebook application update the "Valid OAuth redirect URIs" to "http://localhost:xxxx/signin-facebook" (in my case) every thing works...
OR
Please see the link ExternalLoginConfirmation returns null after facebook succesful login
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With