diff --git a/testapps/RazorPagesApp/Startup.cs b/testapps/RazorPagesApp/Startup.cs index 72b94f8..27852b1 100644 --- a/testapps/RazorPagesApp/Startup.cs +++ b/testapps/RazorPagesApp/Startup.cs @@ -10,19 +10,14 @@ namespace RazorPagesApp public void ConfigureServices(IServiceCollection services) { var builder = services.AddMvc(); + services.AddCookieAuthentication(options => options.LoginPath = "/Login"); ConfigureMvc(builder); } public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(); - app.UseCookieAuthentication(new CookieAuthenticationOptions - { - LoginPath = "/Login", - AutomaticAuthenticate = true, - AutomaticChallenge = true - }); - + app.UseAuthentication(); app.UseMvc(); }