title: Trying to override CreateAsync function on ClaimsIdentityFactory
body: <p>Few days ago, I found a very good tutorial about MVC, Identity and OWIN by Ben Foster. The tutorial is <a href="http://benfoster.io/blog/aspnet-identity-stripped-bare-mvc-part-1" rel="noreferrer">here</a> </p>
  
  <p>I've just finished the tutorial, and I've found a problem trying to override the function 'CreateAsync'. Visual Studio doesn't allow this.</p>
  
  <p>This is the code: </p>
  
  <pre><code>public class AppUserClaimsIdentityFactory : ClaimsIdentityFactory&lt;AppUser&gt;
  {
      public override async Task&lt;ClaimsIdentity&gt; CreateAsync(
          UserManager&lt;AppUser&gt; manager, 
          AppUser user, 
          string authenticationType)
      {
          var identity = await base.CreateAsync(manager, user, authenticationType);
          identity.AddClaim(new Claim(ClaimTypes.Country, user.Country));
  
          return identity;
      }
  }
  </code></pre>
  
  <p>Anybody knows how can I resolve this issue?</p>
  
  <p><strong>Solution</strong></p>
  
  <p>Thanks to @ETorre, that's the final code!</p>
  
  <pre><code>public class AppUserClaimsIdentityFactory : ClaimsIdentityFactory&lt;AppUser, string&gt;
  {
      public async override Task&lt;ClaimsIdentity&gt; CreateAsync(UserManager&lt;AppUser, string&gt; manager, 
              AppUser user, string authenticationType)
      {
          var identity = await base.CreateAsync(manager, user, authenticationType);
          identity.AddClaim(new Claim(ClaimTypes.Country, user.Country));
  
          return identity;
      }
  }
  </code></pre>