title: Creating users with no password using ASP.NET Identity
body: <p>I have been given the requirement to provide the ability to create users through the UI with no password. I am trying to accomplish this using ASP.NET Identity. </p>
  
  <p>I am able to successfully create a user without a password using the <code>UserManager</code>'s <code>Create</code> method:</p>
  
  <pre><code>if (vm.ShouldHavePassword)
  {
      userManager.Create(userToInsert, vm.Password);
  }
  else
  {
      userManager.Create(userToInsert);
  }
  </code></pre>
  
  <p>After the call to the <code>Create</code> method, the test user gets successfully saved into our <code>AspNetUsers</code> table. And when I do not provide a password, the <code>PasswordHash</code> column in our <code>AspNetUsers</code> table is set to <code>NULL</code>.</p>
  
  <p>My issue is, I cannot login as the test user that does not have a password. The following is the method call that we use to validate a user's credentials: </p>
  
  <pre><code>result = await SignInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, shouldLockout: false);
  </code></pre>
  
  <p>I attempted to login as a test user that has a <code>NULL</code> <code>PasswordHash</code> multiple times. To do this, I do not provide a password in our login form. As a result, a <code>NULL</code> password is passed into the <code>PasswordSignInAsync</code> method. The return value of this method call is always <code>SignInStatus.Failure</code>.</p>
  
  <p>Using ASP.NET Identity, how can I configure my code to correctly authenticate user credentials when the credentials contain a <code>NULL</code> password, and the user in the database contains a <code>NULL</code> <code>PasswordHash</code>? Is such a thing even possible? </p>