title: Facebook OAuth stopped working suddenly
body: <p>I noticed yesterday that my Facebook login for my website has stopped working.</p>
  
  <p>This has been working great for the last 2 months, as far as I am aware I have not changed anything. I have tried everything I can on links such as: -  as well as many more...</p>
  
  <p><a href="https://stackoverflow.com/questions/22364442/asp-net-mvc5-owin-facebook-authentication-suddenly-not-working">ASP.NET MVC5 OWIN Facebook authentication suddenly not working</a></p>
  
  <p>I have noticed that the Stack Overflow Facebook auth has also stopped working.</p>
  
  <p>Has anyone else noticed this and found any solution?  It's worth noting I am using azure app services to host.  But this issue is also found when I am using localhost.</p>
  
  <p>My current setup looks like this...</p>
  
  <p>in Startup.Auth.cs</p>
  
  <pre><code>var facebookOptions = new Microsoft.Owin.Security.Facebook.FacebookAuthenticationOptions()
  {
      AppId = "xxxxxxxxxxxxx",
      AppSecret = "xxxxxxxxxxxx"
  };
  facebookOptions.Scope.Add("email");
  app.UseFacebookAuthentication(facebookOptions);
  </code></pre>
  
  <p>In the following method, <code>loginInfo</code> is <code>null</code> every time.</p>
  
  <pre><code>[AllowAnonymous]
  public async Task&lt;ActionResult&gt; ExternalLoginCallback(string returnUrl)
  {
      var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
      if (loginInfo == null)
      {
          return RedirectToAction("Login");
      }
  </code></pre>
  
  <p>I also added a session "WAKEUP" from a different post suggestion, fb auth failed once before and this fixed the issue this time, but it has come back.</p>
  
  <pre><code>[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public ActionResult ExternalLogin(string provider, string returnUrl)
  {
      Session["WAKEUP"] = "NOW!";
  
      // Request a redirect to the external login provider
      return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl }));
  }
  </code></pre>