title: Asp Mvc Core 2 Identity not setting cookie name when using AddAuthentication().AddCookie()
body: <p>Currently, and this works, I am doing the following to setup cookie authentication in an ASP MVC Core 2 app using  Identity:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>services.ConfigureApplicationCookie(options =&gt;
  {
      options.ExpireTimeSpan = TimeSpan.FromDays(1);
      options.SlidingExpiration = true;
      options.LoginPath = "/Account/LogIn";
      options.LogoutPath = "/Account/LogOff";
      options.Cookie.Name = "MyCookieName";
      options.AccessDeniedPath = "/Account/AccessDenied";
  });
  </code></pre>
  
  <p>I want to add JWT to this app and according to the documentation <a href="https://docs.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?tabs=aspnetcore2x" rel="nofollow noreferrer">here</a>, I do that by using something like this (based on the same configuration as above):</p>
  
  <pre class="lang-cs prettyprint-override"><code>services.AddAuthentication()
  .AddCookie(options =&gt;
  {
      options.ExpireTimeSpan = TimeSpan.FromDays(1);
      options.SlidingExpiration = true;
      options.LoginPath = "/Account/LogIn";
      options.LogoutPath = "/Account/LogOff";
      options.Cookie.Name = "MyCookieName";
      options.AccessDeniedPath = "/Account/AccessDenied";
  })
  .AddJwtBearer(options =&gt;
  { // options });
  </code></pre>
  
  <p>When I do this (even if I leave off the <code>AddJwtBearer</code> chain) the cookie is no longer given the name I specify.  The login process still works and I get a cookie but it is named the default Asp cookie name.  </p>
  
  <p>I assume that these two methods of setting the options are the same and the <code>ConfigureApplicationCookie</code> is just a shortcut method to the same thing.</p>
  
  <p>Am I missing something?</p>
  
  <p>Thanks,
  Brian</p>