title: ASP.NET Identity Facebook Authentication adding more scope causes wrong returnurl
body: <p>I want to retrieve facebook First/Last Name and Email information and insert them into AspNetUsers table.</p>
  
  <p>That's why I added the following code piece into Start.Auth;</p>
  
  <pre><code>//app.UseFacebookAuthentication(
          //   appId: WebConfigurationManager.AppSettings["appID"],
          //   appSecret: WebConfigurationManager.AppSettings["appSecret"]);
  
          var MoreFacebookOptions = new FacebookAuthenticationOptions
          {
              AppId = WebConfigurationManager.AppSettings["appID"],
              AppSecret = WebConfigurationManager.AppSettings["appSecret"]
          };
          MoreFacebookOptions.Scope.Add("email");
          MoreFacebookOptions.Scope.Add("first_name");
          MoreFacebookOptions.Scope.Add("middle_name");
          MoreFacebookOptions.Scope.Add("last_name");
  
  
          MoreFacebookOptions.Provider = new FacebookAuthenticationProvider()
          {
              OnAuthenticated = async context =&gt;
              {
                  context.Identity.AddClaim(new System.Security.Claims.Claim("FacebookAccessToken", context.AccessToken));
                  foreach (var claim in context.User)
                  {
                      var claimType = string.Format("urn:facebook:{0}", claim.Key);
                      string claimValue = claim.Value.ToString();
                      if (!context.Identity.HasClaim(claimType, claimValue))
                          context.Identity.AddClaim(new System.Security.Claims.Claim(claimType, claimValue, "XmlSchemaString", "Facebook"));
                  }
  
              }
          };
  
          MoreFacebookOptions.SignInAsAuthenticationType = DefaultAuthenticationTypes.ExternalCookie;
          app.UseFacebookAuthentication(MoreFacebookOptions);
  </code></pre>
  
  <p>And after I click Facebook Login button it redirects me to (HTTP500 The website cannot display the page);</p>
  
  <p><a href="https://www.facebook.com/dialog/oauth?response_type=code&amp;client_id=340978152751092&amp;redirect_uri=https%3A%2F%2Flocalhost%3A44302%2Fsignin-facebook&amp;scope=email%2Cfirst_name%2Cmiddle_name%2Clast_name&amp;state=bjxNOOZveDYKqquGVc1m-BAhDHwh11NwYeog2pEU0n9TC5WIsareAs2xWQPVV45hJNRrCdqHk7oPDwdk0Ijs1KvLslTntlGLHk0Gy24liyrzasOXlarh5HLehSoE6OJPWRa_jUsnEQBGpxhFqAoo3pqM2mw3oWNnyroC7CB2tZHFSxvdEhyABbwL9E0Nj5rvNLe0F1-zjpzM27WL1diDcQxbhQU7CUTPffBEqDBfXn-qEv8Uf6WnIkvYmTbluajf6peXNCFHhN3U7mrspeR87Q" rel="nofollow">https://www.facebook.com/dialog/oauth?response_type=code&amp;client_id=340978152751092&amp;redirect_uri=https%3A%2F%2Flocalhost%3A44302%2Fsignin-facebook&amp;scope=email%2Cfirst_name%2Cmiddle_name%2Clast_name&amp;state=bjxNOOZveDYKqquGVc1m-BAhDHwh11NwYeog2pEU0n9TC5WIsareAs2xWQPVV45hJNRrCdqHk7oPDwdk0Ijs1KvLslTntlGLHk0Gy24liyrzasOXlarh5HLehSoE6OJPWRa_jUsnEQBGpxhFqAoo3pqM2mw3oWNnyroC7CB2tZHFSxvdEhyABbwL9E0Nj5rvNLe0F1-zjpzM27WL1diDcQxbhQU7CUTPffBEqDBfXn-qEv8Uf6WnIkvYmTbluajf6peXNCFHhN3U7mrspeR87Q</a></p>
  
  <p>If I comment out the following lines;</p>
  
  <pre><code>        MoreFacebookOptions.Scope.Add("first_name");
          MoreFacebookOptions.Scope.Add("middle_name");
          MoreFacebookOptions.Scope.Add("last_name");
  </code></pre>
  
  <p>Everything works fine and it redirects me to the intended url;</p>
  
  <pre><code>https://localhost:44302/signin-facebook?code=AQBRSVZjeT8p8OL11cyfXBfQE7Y5rq42Zmt6aNoc4xli6Dmu9BqS_BERY09dT7P4COwSyIcj-8SJgK08jmPG5-sUe3Bl12thCamlhI1moiV-uJ0IcjHQWtiqeC5zzKgOylWmxMTwroHhHutWVLVFMLrhpBg0Xl1NH6LhmYI1MGZIge9qrHn9f4ZXf0s9rLttSUV5c1rJcnMtreDVww27iDgez8sEn2DcIGFsmwlfl4WTsNwg346x1nvrhoHMlEWXmok3SWDf5DREUjiaw6w0v3Uh3prJ_Pe26JdgySCqVEHDfY2O0H2Kql4dM8WQWpnpZpM&amp;state=8eGRtf0oeiwqzS0qHCiWcsz-ZxMA9-DEK9GaTU5UENsi-vnfbaJSsxd57y_BtUF_PhQ9pD7TiYld4bFhytQE4KIACVSokTXfure0XJ5MCUGzoDPtN3ionRxFf2H5K4mu6hmclLvuRr4IPg_7g5InWP9TQZJLefOyQLqu21yOZeE0BnDIUcsP1nrL-dydghS62TrteN_XVk77upIN0L4f2V7jchL3u65l0spZdE337n19nRdB5oJbiBxEVCyKNbkqGF_kRxxs8NCsxSPVdci_Gw#_=_
  </code></pre>
  
  <p>What would be the reason of it? </p>