Jwt Authentication doesn't work in Blazor Serverside
问题 I used Jwt authentication in a Blazor Client Hosted project with roles and everything (using Identity), But when I do the same thing in Blazor Server side It doesn't work, For example After I set the token in the Header: client.DefaultRequestHeaders.Add("Authorization", $"Bearer {Model.Token}"); Console.WriteLine($"Is authenticated = {httpContext.HttpContext.User.Identity.IsAuthenticated}"); IsAuthenticated returns false, and when I navigate to home page (to cause a refresh) the