title: Build a custom user check password in Asp.Net Identity 2
body: <p>I need to build a custom user password check in an application implemented in asp.net MVC 5 and using Asp.Net Identity 2.</p>
  
  <p>I read in a stackoverflow post (<a href="https://stackoverflow.com/questions/27789015/writing-a-custom-iuserpasswordstore-and-signinmanager-passwordsigninasync-in-ide">Writing a custom IUserPasswordStore and SignInManager.PasswordSignInAsync in Identity 2.1</a>) that I only need to override the CheckPasswordAsync method in UserManager.</p>
  
  <p>I try to override this method in IdentityConfig.cs file. Here is the code that I add to the ApplicationUserManager class just for test this solution:</p>
  
  <pre><code>public override async Task&lt;bool&gt; CheckPasswordAsync(ApplicationUser user,   string password)
  {
          return await Task.Run(() =&gt; {
              return true;
          });
  }
  </code></pre>
  
  <p>The problem is that this code is never run in the login process, and the login always fail. To sign in the user I’m using the SignInManager.PasswordSignInAsync to log in the user, this is the default when creating a new web application in asp.net MVC 5. Shouldn’t this method call the ApplicationUserManager. CheckPasswordAsync? Or there is another configuration needed to this work?</p>