title: MVC 5 Owin Facebook Auth results in Null Reference Exception
body: <p>I'm trying to setup integrated OWIN Facebook authentication in a new MVC 5 project in Visual Studio 2013. I have configured apps and keys as per this tutorial:</p>
  
  <p><a href="http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on">http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on</a></p>
  
  <p>However, I'm getting a NullReferenceException thrown from this call in the AccountController:</p>
  
  <pre><code>    [AllowAnonymous]
      public async Task&lt;ActionResult&gt; ExternalLoginCallback(string returnUrl)
      {
          var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
  </code></pre>
  
  <p>I already checked the response in Fiddler and am getting what appears to be a success response from Facebook, but still get this error. The response looks like this:</p>
  
  <pre><code>{"id":"xxx","name":"xxx","first_name":"xxx","last_name":"xxx","link":
  "https:\/\/www.facebook.com\/profile.php?id=xxx","location":{"id":"xxx","name":"xxx"},
  "gender":"xxx","timezone":1,"locale":"en_GB","verified":true,"updated_time":"2013-10-23T10:42:23+0000"}
  </code></pre>
  
  <p>I get this when debugging in http as well as https. I'm guessing this is a framework bug but have so far drawn a blank diagnosing this through reflector.</p>