title: Getting the email from external providers Google and Facebook during account association step in a default MVC5 app using Identity 2.0
body: <p>As per this answer: <a href="http://Getting%20the%20email%20from%20external%20providers%20Google%20and%20Facebook%20during%20account%20association%20step%20in%20a%20default%20MVC5%20app%20using%20Identity%202.0" rel="nofollow">http://stackoverflow.com/questions/20378043/getting-the-email-from-external-providers-google-and-facebook-during-account-ass/20379623#20379623</a></p>
  
  <p>I am trying to get the email from an external provider. </p>
  
  <p>This is my code:</p>
  
  <pre><code>app.UseFacebookAuthentication(
     appId: "X",
     appSecret: "Y");
  
  app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
  {
      ClientId = "X",
      ClientSecret = "Y"
  });
  </code></pre>
  
  <p>The ExternalLoginCallback method in account controller is still as default:</p>
  
  <pre><code>public async Task&lt;ActionResult&gt; ExternalLoginCallback(string returnUrl)
  {
      var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
  </code></pre>
  
  <p>At this point loginInfo is populated correctly apart from loginInfo.Email which is always null.</p>
  
  <p>No matter the account provider they all authenticate but they all have a null email.</p>
  
  <p>I have create a new MVC5 project from scratch with all nuget packages up to date and the latest VS2013 code.    </p>