AspNetCore - change cookie name when using Google Authentication

Here's how you can replace the default name used for the external cookie.

services.AddIdentity<Member, Role>(options =>
{
    options.Cookies.ExternalCookie.CookieName = "name";
});

It's work for me in VS2017

In the Startup.cs ConfigureServices():

services.ConfigureApplicationCookie(options => {
  options.Cookie.Name = "NewCookieName";
});

ASP.NET Core 2.2

services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
    .AddCookie(options =>
    {
        options.Cookie.Name = "my_cookie";
    });