title: Asp.net Mvc 6 get user claims immediately after log in
body: <p>In a Asp.net Mvc 6 website I customized the out-of-the-box <code>AccountController</code> so that I add a custom Claim before calling <code>userManager.CreateAsync()</code>, both when registering</p>
  
  <ul>
  <li>with a local account (email/password), in the <code>Register()</code> method of the controller</li>
  <li>with an external provider (google/facebook), in the <code>ExternalLoginConfirmation()</code> of the controller</li>
  </ul>
  
  <p>Now what I'd like to do is, immediately after the user logs in, both</p>
  
  <ul>
  <li>in the <code>Login()</code> method after calling <code>signInManager.PasswordSignInAsync()</code> and</li>
  <li>in the <code>ExternalLoginCallback()</code> method after calling <code>signInManager.ExternalLoginSignInAsync()</code></li>
  </ul>
  
  <p>...to retrieve that claim, ideally without hitting the DB to get the User.</p>
  
  <p>I noticed that if I look at User directly after sign-in, the Claims collection is empty. However, if I look at it in a subsequent controller action the Claims collection is populated and has my custom claim in it.</p>
  
  <p>The question is, why isn't the Claims populated immediately after sign-in (I guess the sign-in code doesn't refresh the CurrentPrincipal?) and is there another place to check directly after sign-in to get the claims without hitting the DB?</p>