title: Asp.NET Core 2 Authentication. SignInManager.PasswordSignInAsync() succeeds, but User.Identity.IsAuthenticated is false
body: <p>I was following some tutorials on IdentityUser, and I think I did exactly as in tutorials, but when I try to login, I get "MyIdentity: False" (with LogInformation) even thou _signInManager succeeds, which seems to be very weird. I tried to set the users as confirmed, but with no result.</p>
  
  <p>I'm working on Visual Studio on Mac.</p>
  
  <p>Here's how I register my users:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public async Task&lt;IActionResult&gt; Register(RegisterViewModel model)
  {
      if (ModelState.IsValid)
      {
          var user = new ApplicationUser()
          {
              UserName = model.Email,
              Email = model.Email
          };
          var result = await _userManager.CreateAsync(user, model.Password);
  
          if (result.Succeeded)
          {
              await _signInManager.SignInAsync(user, false);
              return this.RedirectToAction("Index", "Home");
          }
          else
          {
              foreach (var error in result.Errors)
                  ModelState.AddModelError("", error.Description);
          }   
      }
  
      return View(model);
  }
  </code></pre>
  
  <p>And here's how I try to login:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[HttpPost]
  [AllowAnonymous]
  [ValidateAntiForgeryToken]
  public async Task&lt;IActionResult&gt; Login(LoginViewModel model)
  {
      if (ModelState.IsValid)
      {
          var result = await _signInManager.PasswordSignInAsync(
              model.Email,
              model.Password,
              model.RememberMe,
              lockoutOnFailure: false
          );
  
          if (result.Succeeded)
          {
              _logger.LogInformation("MyIdentity: " + User.Identity.IsAuthenticated);
              return this.RedirectToAction("Index", "Home");
          }
  
          ModelState.AddModelError("", "Invalid Login attempt.");
      }
      return View(model);
  }
  </code></pre>
  
  <p>Here's how I configure the services for it:</p>
  
  <pre class="lang-cs prettyprint-override"><code>services.AddDbContext&lt;CmagruDBContext&gt;(options =&gt;
      options.UseSqlite("Data Source=Cmagru.db",
          b =&gt; b.MigrationsAssembly("Presentation")));
  
  services.AddIdentity&lt;ApplicationUser, IdentityRole&gt;()
      .AddEntityFrameworkStores&lt;CmagruDBContext&gt;()
      .AddDefaultTokenProviders();
  
  services.Configure&lt;IdentityOptions&gt;(options =&gt;
  {
      options.Password.RequireDigit = false;
      options.Password.RequiredLength = 3;
      options.Password.RequireLowercase = false;
      options.Password.RequireNonAlphanumeric = false;
      options.Password.RequireUppercase = false;
      options.User.RequireUniqueEmail = true;
  });
  
  services.ConfigureApplicationCookie(options =&gt;
  {
      options.Cookie.HttpOnly = true;
      options.ExpireTimeSpan = TimeSpan.FromMinutes(30);
      options.LoginPath = "/Account/Login";
      options.AccessDeniedPath = "/Account/AccessDenied";
      options.SlidingExpiration = true;
  });
  </code></pre>
  
  <p>And I do have <code>app.UseAuthentication();</code> in Configure</p>