title: ASP.NET Core 2.0 Preview 1: How to set up Cookie Authentication with custom login path
body: <p>In ASP.NET Core 2.0 the .UseAuthentication() middleware has a breaking change that no longer allows the <a href="https://docs.microsoft.com/en-us/aspnet/core/security/authentication/cookie" rel="noreferrer">old syntax mentioned here</a> to work.</p>
  
  <p>The new version appears to deal with config in addAuthentication, but I can't find any details anywhere on how to change my old code that specified a custom login and logout url.</p>
  
  <pre><code>        services.AddAuthentication(o =&gt;
          {
              // Where can I specify this?????
              var opt = new CookieAuthenticationOptions()
              {
                  LoginPath = "/api/login",
                  LogoutPath = "/api/logout",
              };
  
             o.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
             o.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
          });
  </code></pre>
  
  <p>Any help would be appreciated...</p>