Hi,
I'm trying to develop web app using Visual Studio 2013 and MVC pattern. I hope I've choosen good forum.
I want to enable on my web app oath authentication system. I followed EXCACTLY every step decribed in
Microsoft's tutorial. Unfortunetly, despite I did NOTHING else in my project, authentication with facebook doesn't work.
Application give me unhandled exception in action ExternalLoginCallback in Account Controller. The function GetExternalLoginInfoAsync() returns null value.
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
While calling this method, returnUrl parameter is also null. I don't if this is excepted.
I used Fiddler application to track down what's happening in my browser. After choosing to log in using facebook on my website, there is request to facebook. Then facebook respons with redirection to mydomain/signin-facebook?code=<some hash here>&state=<and here>#_=_ That suggest everything works fine on facebook side and the problem occurs inside my app.
I would like to follow whats happening after it, but I could find what code is executed after calling "signin-facebook" action(?).
For the record: i've googled the issue. It looks like several people had the same problem, proposed solution were:
-reset IIS
-change FacebookAuthenticationOptions in App_Start/Startup.Auth.cs file
-restart seesion before calling GetExternalLoginInfoAsync() method
-some code changes in ExternalLoginCallback
-update references
-fill the user field on facebook account
None of them helped.
I've tried it with several facebook accounts. I've tried it on different computers and with page published on some server. Nothing changed.
I'd really appreciate help here, since it's basic funtion and I can't develop any web application using Microsoft solutions without solving this issue.