title: ASP.NET Identity AuthenticationManager vs. SignInManager and cookie expiration
body: <p>What is the difference between using AuthenticationManager SignIn as opposed to using SignInManager PasswordSignIn/SignIn?  I have an implementation using the SignInManager and have my cookie expiration set to 30 days however it seems my web app will randomly expire my cookies far before 30 days.  Would using the SignInManager implementation be the cause of this?  Should I be using the AuthenticationManager implementation instead?  </p>
  
  <p>The out of the box example code shows sign in like this, but I've also seen other examples that use AuthenticationManager implementation.</p>
  
  <pre><code>var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);
  </code></pre>
  
  <p>Here is my startup configuration.</p>
  
  <pre><code>            app.UseCookieAuthentication(new CookieAuthenticationOptions
          {
              AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
              ExpireTimeSpan = TimeSpan.FromDays(30),
              LoginPath = new PathString("/signin"),
              Provider = new CookieAuthenticationProvider
              {
                  OnValidateIdentity = SecurityStampValidator.OnValidateIdentity&lt;AppUserManager, AppUser&gt;(
                      validateInterval: TimeSpan.FromMinutes(30),
                      regenerateIdentity: (manager, user) =&gt; user.GenerateUserIdentityAsync(manager))
              }
          });
          app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
          app.UseTwoFactorSignInCookie(DefaultAuthenticationTypes.TwoFactorCookie, TimeSpan.FromMinutes(5));
          app.UseTwoFactorRememberBrowserCookie(DefaultAuthenticationTypes.TwoFactorRememberBrowserCookie);
  </code></pre>