title: .Net Core Identity seed data: unable to login using credentials seeded
body: <p>I have my Initialiser setup and everything seems to run correctly and all the details are saved to the database but when I try to log in it via the webapp it fails everytime. When I run the debugger in the login controller it returns {Failed} after this is hit:</p>
  <pre><code> var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: false);
  </code></pre>
  <p>Initialiser:</p>
  <pre><code>public class DbInitialiser : IDbInitialiser
      {
         
          private readonly ApplicationDbContext _db;
          private readonly UserManager&lt;IdentityUser&gt; _userManager;
          private readonly RoleManager&lt;IdentityRole&gt; _roleManager;
          public DbInitialiser(UserManager&lt;IdentityUser&gt; userManager, RoleManager&lt;IdentityRole&gt; roleManager, ApplicationDbContext db)
          {
              _db = db;
              _userManager = userManager;
              _roleManager = roleManager;
  
          }
  
          public void Initialise()
          {
              try
              {
                  if (_db.Database.GetPendingMigrations().Count() &gt; 0) 
                  {
                      _db.Database.Migrate();
                  }
              }
              catch (Exception ex)
              {
                  
              }
  
              if (_db.Roles.Any(r =&gt; r.Name == &quot;Admin&quot;)) return;
  
              _roleManager.CreateAsync(new IdentityRole(&quot;Admin&quot;)).GetAwaiter().GetResult();//makes sure this executes before proceceding with anything else
              _roleManager.CreateAsync(new IdentityRole(&quot;Manager&quot;)).GetAwaiter().GetResult();
  
  
  
              _userManager.CreateAsync(new Employee       
              {
                  UserName = &quot;Admin&quot;,
                  Email = &quot;admin@gmail.com&quot;,
                  EmailConfirmed = true,
                  TwoFactorEnabled = false,
                  PhoneNumberConfirmed = true
                  //can set other properties, this is for the initial setup
              }, &quot;Abc123!Abc123!&quot;).GetAwaiter().GetResult();
  
              IdentityUser user = _db.Users.Where(u =&gt; u.Email == &quot;admin@gmail.com&quot;).FirstOrDefault();
              _userManager.AddToRoleAsync(user, &quot;Admin&quot;).GetAwaiter().GetResult();
  
  
          }
  </code></pre>
  <p>(My Employee class extends IdentityUser)</p>
  <p>I have checked all my password requirements as mentioned in other similar posts so I know it isnt to do with that and when I check in SSMS all the data for the user is there in aspnetusers so I am not sure why it wont let me login to the admin user that is seeded</p>