From c7f2f42b07f5503e99568e288b6f27ae03ea6fa2 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 20 Oct 2023 15:55:04 +1100 Subject: Fix login bug --- Program.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Program.cs') diff --git a/Program.cs b/Program.cs index 68c7af3..90fcbcb 100644 --- a/Program.cs +++ b/Program.cs @@ -9,6 +9,7 @@ namespace HyperBooru; public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); + builder.Services.AddSession(); builder.Services.AddHttpContextAccessor(); builder.Services.AddAuthentication( CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(); @@ -38,6 +39,7 @@ public class Program { using var db = scope.ServiceProvider.GetRequiredService(); db.Database.Migrate(); + app.UseSession(); app.UseHsts(); app.UseHttpsRedirection(); app.UseStaticFiles(); -- cgit v1.3