title: ClaimTypes for getting the user's profile image in mvc 6
body: <p>This is my <code>ExternalLoginConfirmation</code> task, that is the default code added when the project is created. I have added these lines to get the user claims:</p>
  
  <pre><code>user.Firstname = info.Principal.Claims.FirstOrDefault(c =&gt; c.Type == ClaimTypes.GivenName)?.ToString();
  user.Lastname = info.Principal.Claims.FirstOrDefault(c =&gt; c.Type == ClaimTypes.Surname)?.ToString();
  user.Gender = info.Principal.Claims.FirstOrDefault(c =&gt; c.Type == ClaimTypes.Gender)?.ToString();
  </code></pre>
  
  <p>However  I'm not able to get the user profile image as it does not exist in <code>ClaimTypes</code>.  </p>
  
  <pre><code>    public async Task&lt;IActionResult&gt; ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl = null)
      {
          if (ModelState.IsValid)
          {
              // Get the information about the user from the external login provider
              var info = await _signInManager.GetExternalLoginInfoAsync();
              if (info == null)
              {
                  return View("ExternalLoginFailure");
              }
              var user = new ApplicationUser { UserName = model.Email, Email = model.Email };
              var result = await _userManager.CreateAsync(user);
              if (result.Succeeded)
              {
                  result = await _userManager.AddLoginAsync(user, info);
                  if (result.Succeeded)
                  {
                      user.Firstname = info.Principal.Claims.FirstOrDefault(c =&gt; c.Type == ClaimTypes.GivenName)?.ToString();
                      user.Lastname = info.Principal.Claims.FirstOrDefault(c =&gt; c.Type == ClaimTypes.Surname)?.ToString();
                      user.Gender = info.Principal.Claims.FirstOrDefault(c =&gt; c.Type == ClaimTypes.Gender)?.ToString();
  
                      await _signInManager.SignInAsync(user, isPersistent: false);
                      _logger.LogInformation(6, "User created an account using {Name} provider.", info.LoginProvider);
                      return RedirectToLocal(returnUrl);
                  }
              }
              AddErrors(result);
          }
  
          ViewData["ReturnUrl"] = returnUrl;
          return View(model);
      }
  </code></pre>
  
  <p>Note that <code>info</code> is missing <code>ExternalPrincipal</code> and the following functionality is not available either:</p>
  
  <pre><code>info.ExternalPrincipal.FindFirstValue("pictureUrl"); 
  </code></pre>