From 8ae25dbb65524956bbebb8f0253e77269fcf28b2 Mon Sep 17 00:00:00 2001 From: PascalSenn Date: Thu, 20 Jun 2024 15:18:54 +0200 Subject: [PATCH] Fixed login --- .../src/AspNet/Security/EnsureAuthenticatedMiddleware.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Server/src/AspNet/Security/EnsureAuthenticatedMiddleware.cs b/src/Server/src/AspNet/Security/EnsureAuthenticatedMiddleware.cs index 8acfa53..d15d2d5 100644 --- a/src/Server/src/AspNet/Security/EnsureAuthenticatedMiddleware.cs +++ b/src/Server/src/AspNet/Security/EnsureAuthenticatedMiddleware.cs @@ -31,7 +31,12 @@ public async Task InvokeAsync(HttpContext context) return; } - if (context.Request.Path.StartsWithSegments("/api") + if (context.Request.Path.StartsWithSegments("/api/session/auth")) + { + await context.ChallengeAsync(); + } + else if ( + context.Request.Path.StartsWithSegments("/api") || context.Request.Path.StartsWithSegments("/graphql") || context.Request.Path.StartsWithSegments("/signalR") || context.Request.Path.StartsWithSegments("/error"))