From 750e63300c43a2eb707cb6d413edb114b7f01766 Mon Sep 17 00:00:00 2001 From: ngfrolov Date: Mon, 18 Sep 2023 17:10:30 +0500 Subject: [PATCH] fix JwtBearerEvents --- AsbCloudWebApi/DependencyInjection.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsbCloudWebApi/DependencyInjection.cs b/AsbCloudWebApi/DependencyInjection.cs index d269ef28..998212b2 100644 --- a/AsbCloudWebApi/DependencyInjection.cs +++ b/AsbCloudWebApi/DependencyInjection.cs @@ -121,8 +121,7 @@ namespace AsbCloudWebApi return Task.CompletedTask; } - context.HttpContext.RequestServices.GetRequiredService(); - var userService = services.BuildServiceProvider().GetRequiredService(); + var userService = context.HttpContext.RequestServices.GetRequiredService(); var user = userService.GetOrDefault(idUser.Value); if (user is null)