title: Asp.NET Identity stopped working on Chrome
body: <p>For some unknown reason, I no longer can log in into my own application on Chrome.</p>
  
  <p>This is how I'm doing signing in:</p>
  
  <pre><code>    [AllowAnonymous]
      [HttpPost]
      public async Task&lt;ActionResult&gt; Login(LoginModel model)
      {
          if (User.Identity.IsAuthenticated)
              return RedirectToAction("Index", "Home");
  
          if (!ModelState.IsValid)
              return View();
  
          var status = await signInManager.PasswordSignInAsync(model.Login, model.Password, true, false);
          switch (status)
          {
              case Microsoft.AspNet.Identity.Owin.SignInStatus.Success:
                  {
                      int userId = User.Identity.GetUserId&lt;int&gt;();
                      if (userManager.IsFirstLogin(userId))
                      {
                          return RedirectToAction("Declaration", "Home", new { returnUrl = model.ReturnUrl });
                      }
  
                      return RedirectToLocal(model.ReturnUrl);
                  }
              default:
                  return View();
          }
      }
  </code></pre>
  
  <p>I debugged the code and PasswordSignInAsync succeeds, however Chrome shows no cookies set for the page. In effect redirection to action, which is marked with [Authorize] attribute redirects again to login page.</p>
  
  <p>I tested site on IE and everything works correctly, I can log in and out and the cookie is being set correctly.</p>
  
  <p>If I can provide more detailed information, just tell me.</p>
  
  <hr />
  
  <p><b>Edit:</b> More details</p>
  
  <p>I've been testing a piece of application, which is date-time sensitive (stops displaying after specific date). I changed system time to 01 August 2016, logged in and then switched back to now. That was when everything stopped working.</p>
  
  <p>What is curious, when I switch back to that future time, I can log in again and session cookie is being set correctly. But when I return to "now", I can not log in again.</p>