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"))