diff --git a/testapps/RazorPagesApp/Startup.cs b/testapps/RazorPagesApp/Startup.cs index b0726c7605..33964de1da 100644 --- a/testapps/RazorPagesApp/Startup.cs +++ b/testapps/RazorPagesApp/Startup.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -10,7 +11,7 @@ namespace RazorPagesApp public void ConfigureServices(IServiceCollection services) { var builder = services.AddMvc(); - services.AddAuthentication().AddCookie(options => options.LoginPath = "/Login"); + services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => options.LoginPath = "/Login"); ConfigureMvc(builder); }