From 8d581456043157fbd66b50d452cc791c132f044c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 12:33:49 +0000 Subject: [PATCH 1/3] Upgrade all net6.0 projects to net8.0 with updated NuGet packages - Update target frameworks from net6.0 to net8.0 (and net6.0-windows to net8.0-windows) - Update Microsoft.EntityFrameworkCore.Sqlite/SqlServer from 6.0.1 to 8.0.8 - Update Microsoft.Data.SqlClient from 2.1.7 to 5.2.0 - Update Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore to 8.0.8 - Update Microsoft.AspNetCore.SpaServices.Extensions to 8.0.8 (React, Stencil, Vue2) - Update Microsoft.AspNetCore.SpaProxy to 8.0.8 (Vue3) - Remove VueCliMiddleware from Stencil and Vue2 (replaced with SpaProxy/SpaServices pattern) - Remove Microsoft.AspNetCore.ApiAuthorization.IdentityServer from BlazorWasm Server - Migrate AppDbContext from ApiAuthorizationDbContext to IdentityDbContext - Update Blazor WASM Client packages to 8.0.8 - Update Microsoft.Extensions.Http to 8.0.0 - Update Microsoft.VisualStudio.Web.CodeGeneration.Design to 8.0.5 - Korzh.EasyQuery packages remain at 7.4.0 (compatible with .NET 8) Co-Authored-By: Ian Moritz --- ...mo.BlazorWasm.AdhocReporting.Client.csproj | 12 +++++----- .../OidcConfigurationController.cs | 11 +++------- .../Server/Data/AppDbContext.cs | 10 +++------ ...mo.BlazorWasm.AdhocReporting.Server.csproj | 22 +++++++++---------- .../Server/Program.cs | 14 ------------ ...mo.BlazorWasm.AdhocReporting.Shared.csproj | 2 +- .../EqDemo.BlazorServer.AdvancedSearch.csproj | 10 ++++----- ...Demo.AspNetCoreReact.AdvancedSearch.csproj | 10 ++++----- ...mo.AspNetCoreStencil.AdvancedSearch.csproj | 14 ++++++------ ...qDemo.AspNetCoreVue2.AdvancedSearch.csproj | 12 +++++----- AspNetCore/Vue2/AdvancedSearch/Startup.cs | 8 +------ .../AdvancedSearch.Server.csproj | 11 ++++------ .../EqDemoWinFormsNet6.csproj | 4 ++-- Wpf/EqDemoWpfNet6/EqDemoWpfNet6.csproj | 4 ++-- 14 files changed, 56 insertions(+), 88 deletions(-) diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj index 757d9614..0a255391 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj @@ -1,18 +1,18 @@  - net6.0 + net8.0 EqDemo.Client enable enable - - - - - + + + + + diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs index 07da33dc..d554053a 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs @@ -1,4 +1,3 @@ -using Microsoft.AspNetCore.ApiAuthorization.IdentityServer; using Microsoft.AspNetCore.Mvc; namespace EqDemo.Controllers @@ -7,19 +6,15 @@ public class OidcConfigurationController : Controller { private readonly ILogger _logger; - public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger logger) + public OidcConfigurationController(ILogger logger) { - ClientRequestParametersProvider = clientRequestParametersProvider; _logger = logger; } - public IClientRequestParametersProvider ClientRequestParametersProvider { get; } - [HttpGet("_configuration/{clientId}")] public IActionResult GetClientRequestParameters([FromRoute] string clientId) { - var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId); - return Ok(parameters); + return Ok(new Dictionary()); } } -} \ No newline at end of file +} diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Data/AppDbContext.cs b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Data/AppDbContext.cs index 6f103610..e28e20d7 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Data/AppDbContext.cs +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Data/AppDbContext.cs @@ -1,18 +1,14 @@ -using Microsoft.AspNetCore.ApiAuthorization.IdentityServer; +using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.Options; - -using Duende.IdentityServer.EntityFramework.Options; using EqDemo.Models; namespace EqDemo.Data { - public class AppDbContext : ApiAuthorizationDbContext + public class AppDbContext : IdentityDbContext { public AppDbContext( - DbContextOptions options, - IOptions operationalStoreOptions) : base(options, operationalStoreOptions) + DbContextOptions options) : base(options) { } diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/EqDemo.BlazorWasm.AdhocReporting.Server.csproj b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/EqDemo.BlazorWasm.AdhocReporting.Server.csproj index 79054182..ba6fba39 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/EqDemo.BlazorWasm.AdhocReporting.Server.csproj +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/EqDemo.BlazorWasm.AdhocReporting.Server.csproj @@ -1,14 +1,14 @@ - net6.0 + net8.0 disable enable EqDemo.BlazorWasm.AdhocReporting.Server EqDemo.Server - - + + @@ -23,14 +23,14 @@ - - - - - - - - + + + + + + + + diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Program.cs b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Program.cs index 4a2636a4..9ff52e1c 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Program.cs +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Program.cs @@ -1,5 +1,3 @@ -using System.IdentityModel.Tokens.Jwt; -using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; @@ -29,18 +27,7 @@ .AddRoles() .AddEntityFrameworkStores(); -builder.Services.AddIdentityServer() - .AddApiAuthorization(options => { - //the following 2 lines are necessary to support roles on the WebAssembly side - options.IdentityResources["openid"].UserClaims.Add("role"); - options.ApiResources.Single().UserClaims.Add("role"); - }); - -// We need to do this as it maps "role" to ClaimTypes.Role and causes issues -JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Remove("role"); -builder.Services.AddAuthentication() - .AddIdentityServerJwt(); //EasyQuery services builder.Services.AddEasyQuery() @@ -79,7 +66,6 @@ app.UseRouting(); -app.UseIdentityServer(); app.UseAuthentication(); app.UseAuthorization(); diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Shared/EqDemo.BlazorWasm.AdhocReporting.Shared.csproj b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Shared/EqDemo.BlazorWasm.AdhocReporting.Shared.csproj index a5b78ac4..9a938be4 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Shared/EqDemo.BlazorWasm.AdhocReporting.Shared.csproj +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Shared/EqDemo.BlazorWasm.AdhocReporting.Shared.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable enable diff --git a/AspNetCore/Blazor/AdvancedSearch.BlazorServer/EqDemo.BlazorServer.AdvancedSearch.csproj b/AspNetCore/Blazor/AdvancedSearch.BlazorServer/EqDemo.BlazorServer.AdvancedSearch.csproj index 41ec6ca4..d254a5aa 100644 --- a/AspNetCore/Blazor/AdvancedSearch.BlazorServer/EqDemo.BlazorServer.AdvancedSearch.csproj +++ b/AspNetCore/Blazor/AdvancedSearch.BlazorServer/EqDemo.BlazorServer.AdvancedSearch.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 disable enable EqDemo @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/AspNetCore/React/AdvancedSearch/EqDemo.AspNetCoreReact.AdvancedSearch.csproj b/AspNetCore/React/AdvancedSearch/EqDemo.AspNetCoreReact.AdvancedSearch.csproj index 40bb9e61..79f37512 100644 --- a/AspNetCore/React/AdvancedSearch/EqDemo.AspNetCoreReact.AdvancedSearch.csproj +++ b/AspNetCore/React/AdvancedSearch/EqDemo.AspNetCoreReact.AdvancedSearch.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 true Latest false @@ -10,10 +10,10 @@ true - - - - + + + + diff --git a/AspNetCore/Stencil/AdvancedSearch/EqDemo.AspNetCoreStencil.AdvancedSearch.csproj b/AspNetCore/Stencil/AdvancedSearch/EqDemo.AspNetCoreStencil.AdvancedSearch.csproj index 8ea48d12..2c6cb8d2 100644 --- a/AspNetCore/Stencil/AdvancedSearch/EqDemo.AspNetCoreStencil.AdvancedSearch.csproj +++ b/AspNetCore/Stencil/AdvancedSearch/EqDemo.AspNetCoreStencil.AdvancedSearch.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 true Latest false @@ -10,18 +10,18 @@ true - - - - - + + + + + - + diff --git a/AspNetCore/Vue2/AdvancedSearch/EqDemo.AspNetCoreVue2.AdvancedSearch.csproj b/AspNetCore/Vue2/AdvancedSearch/EqDemo.AspNetCoreVue2.AdvancedSearch.csproj index b84cd155..e407f7d7 100644 --- a/AspNetCore/Vue2/AdvancedSearch/EqDemo.AspNetCoreVue2.AdvancedSearch.csproj +++ b/AspNetCore/Vue2/AdvancedSearch/EqDemo.AspNetCoreVue2.AdvancedSearch.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 3.0 ClientApp\ $(DefaultItemExcludes);$(SpaRoot)node_modules\** @@ -10,16 +10,16 @@ - - + + - - - + + + diff --git a/AspNetCore/Vue2/AdvancedSearch/Startup.cs b/AspNetCore/Vue2/AdvancedSearch/Startup.cs index e1fcb214..0e7aff35 100644 --- a/AspNetCore/Vue2/AdvancedSearch/Startup.cs +++ b/AspNetCore/Vue2/AdvancedSearch/Startup.cs @@ -7,8 +7,6 @@ using Microsoft.Extensions.Hosting; using Microsoft.EntityFrameworkCore; -using VueCliMiddleware; - using Korzh.EasyQuery.Services; using EasyData.Export; @@ -112,11 +110,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) if (env.IsDevelopment()) { - // run npm process with client app - spa.UseVueCli(npmScript: "serve", port: 8085, regex: "Compiled "); - // if you just prefer to proxy requests from client app, use proxy to SPA dev server instead: - // app should be already running before starting a .NET client - // spa.UseProxyToSpaDevelopmentServer("http://localhost:8080"); // your Vue app port + spa.UseProxyToSpaDevelopmentServer("http://localhost:8085"); } }); diff --git a/AspNetCore/Vue3/AdvancedSearch.Server/AdvancedSearch.Server.csproj b/AspNetCore/Vue3/AdvancedSearch.Server/AdvancedSearch.Server.csproj index 4bd2b439..79f36d82 100644 --- a/AspNetCore/Vue3/AdvancedSearch.Server/AdvancedSearch.Server.csproj +++ b/AspNetCore/Vue3/AdvancedSearch.Server/AdvancedSearch.Server.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 enable enable ..\AdvancedSearch.Client @@ -13,17 +13,14 @@ - - 6.*-* - + - - - + + diff --git a/WinForms/EqDemoWinFormsNet6/EqDemoWinFormsNet6.csproj b/WinForms/EqDemoWinFormsNet6/EqDemoWinFormsNet6.csproj index 1a3e03d9..25df8b5d 100644 --- a/WinForms/EqDemoWinFormsNet6/EqDemoWinFormsNet6.csproj +++ b/WinForms/EqDemoWinFormsNet6/EqDemoWinFormsNet6.csproj @@ -1,7 +1,7 @@ WinExe - net6.0-windows + net8.0-windows true EqDemo @@ -27,7 +27,7 @@ - + diff --git a/Wpf/EqDemoWpfNet6/EqDemoWpfNet6.csproj b/Wpf/EqDemoWpfNet6/EqDemoWpfNet6.csproj index a33b5046..958d4ccf 100644 --- a/Wpf/EqDemoWpfNet6/EqDemoWpfNet6.csproj +++ b/Wpf/EqDemoWpfNet6/EqDemoWpfNet6.csproj @@ -1,7 +1,7 @@ WinExe - net6.0-windows + net8.0-windows true EqDemo @@ -26,7 +26,7 @@ - + From e7e1bb6b389b748eea37df5fe376effeb4f83818 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 12:38:27 +0000 Subject: [PATCH 2/3] Remove OIDC/IdentityServer auth from BlazorWasm client to match server-side removal - Remove AddApiAuthorization() and BaseAddressAuthorizationMessageHandler from Client Program.cs - Simplify App.razor to use RouteView instead of AuthorizeRouteView - Remove RemoteAuthenticatorView from Authentication.razor - Clear LoginDisplay.razor and RedirectToLogin.razor (auth removed) - Remove OidcConfigurationController.cs (no longer needed) - Remove Microsoft.AspNetCore.Components.WebAssembly.Authentication package - Remove Microsoft.Extensions.Http package (no longer needed) - Remove IdentityServer config sections from appsettings.json and appsettings.Development.json Addresses Devin Review feedback about client-side OIDC being broken after server-side IdentityServer removal. Co-Authored-By: Ian Moritz --- .../Client/App.razor | 37 ++++++------------- ...mo.BlazorWasm.AdhocReporting.Client.csproj | 3 +- .../Client/Pages/Authentication.razor | 6 +-- .../Client/Program.cs | 9 +---- .../Client/Shared/LoginDisplay.razor | 25 +------------ .../Client/Shared/RedirectToLogin.razor | 9 +---- .../OidcConfigurationController.cs | 20 ---------- .../Server/appsettings.Development.json | 5 --- .../Server/appsettings.json | 7 ---- 9 files changed, 19 insertions(+), 102 deletions(-) delete mode 100644 AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/App.razor b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/App.razor index d07039a5..36912bb8 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/App.razor +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/App.razor @@ -1,25 +1,12 @@ - - - - - - @if (context.User.Identity?.IsAuthenticated != true) - { - - } - else - { -

You are not authorized to access this resource.

- } -
-
- -
- - Not found - -

Sorry, there's nothing at this address.

-
-
-
-
+ + + + + + + Not found + +

Sorry, there's nothing at this address.

+
+
+
diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj index 0a255391..f93db97e 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/EqDemo.BlazorWasm.AdhocReporting.Client.csproj @@ -11,8 +11,7 @@ - - +
diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Authentication.razor b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Authentication.razor index 6c743567..7d221ef3 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Authentication.razor +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Authentication.razor @@ -1,6 +1,6 @@ -@page "/authentication/{action}" -@using Microsoft.AspNetCore.Components.WebAssembly.Authentication - +@page "/authentication/{action}" + +

Authentication is not configured.

@code{ [Parameter] public string? Action { get; set; } diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Program.cs b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Program.cs index ba141b48..88fdb1de 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Program.cs +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Program.cs @@ -1,5 +1,4 @@ using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.WebAssembly.Authentication; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using EqDemo.Client; @@ -8,12 +7,6 @@ builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); -builder.Services.AddHttpClient("EqDemo.BlazorWasm.AdhocReporting.ServerAPI", client => client.BaseAddress = new Uri(builder.HostEnvironment.BaseAddress)) - .AddHttpMessageHandler(); - -// Supply HttpClient instances that include access tokens when making requests to the server project -builder.Services.AddScoped(sp => sp.GetRequiredService().CreateClient("EqDemo.BlazorWasm.AdhocReporting.ServerAPI")); - -builder.Services.AddApiAuthorization(); +builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); await builder.Build().RunAsync(); diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/LoginDisplay.razor b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/LoginDisplay.razor index 5e52e86f..5b25a178 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/LoginDisplay.razor +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/LoginDisplay.razor @@ -1,24 +1 @@ -@using Microsoft.AspNetCore.Components.Authorization -@using Microsoft.AspNetCore.Components.WebAssembly.Authentication - -@inject NavigationManager Navigation -@inject SignOutSessionStateManager SignOutManager - - - - Hello, @context.User.Identity?.Name! - - - - Register - Log in - - - -@code{ - private async Task BeginSignOut(MouseEventArgs args) - { - await SignOutManager.SetSignOutState(); - Navigation.NavigateTo("authentication/logout"); - } -} +@* Authentication has been removed as part of the .NET 8 migration (IdentityServer was deprecated). *@ diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/RedirectToLogin.razor b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/RedirectToLogin.razor index 2db61cf6..5b25a178 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/RedirectToLogin.razor +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Shared/RedirectToLogin.razor @@ -1,8 +1 @@ -@inject NavigationManager Navigation - -@code { - protected override void OnInitialized() - { - Navigation.NavigateTo($"authentication/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}"); - } -} +@* Authentication has been removed as part of the .NET 8 migration (IdentityServer was deprecated). *@ diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs deleted file mode 100644 index d554053a..00000000 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/Controllers/OidcConfigurationController.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace EqDemo.Controllers -{ - public class OidcConfigurationController : Controller - { - private readonly ILogger _logger; - - public OidcConfigurationController(ILogger logger) - { - _logger = logger; - } - - [HttpGet("_configuration/{clientId}")] - public IActionResult GetClientRequestParameters([FromRoute] string clientId) - { - return Ok(new Dictionary()); - } - } -} diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.Development.json b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.Development.json index 4e2e9775..0c208ae9 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.Development.json +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.Development.json @@ -4,10 +4,5 @@ "Default": "Information", "Microsoft.AspNetCore": "Warning" } - }, - "IdentityServer": { - "Key": { - "Type": "Development" - } } } diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.json b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.json index 4826929d..a1986a8b 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.json +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Server/appsettings.json @@ -5,13 +5,6 @@ "Microsoft.AspNetCore": "Warning" } }, - "IdentityServer": { - "Clients": { - "EqDemo.BlazorWasm.AdhocReporting.Client": { - "Profile": "IdentityServerSPA" - } - } - }, "AllowedHosts": "*", "ConnectionStrings": { "EqDemoSqLite": "Data Source=eqdemo-sqlite.db", From c185a3cbbd9db9b2a90c89b77aaa34ca08995baa Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 12:44:11 +0000 Subject: [PATCH 3/3] Remove remaining auth references from BlazorWasm Client - Remove AuthenticationService.js script tag from index.html (404 after package removal) - Remove AccessTokenNotAvailableException handling from FetchData.razor - Remove IAccessTokenProviderAccessor, AuthenticationStateProvider, Authorize attribute, and role-based UI from Reports.razor - Simplify Reports.razor to always show report management controls Co-Authored-By: Ian Moritz --- .../Client/Pages/FetchData.razor | 14 +--- .../Client/Pages/Reports.razor | 73 +++---------------- .../Client/wwwroot/index.html | 1 - 3 files changed, 13 insertions(+), 75 deletions(-) diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/FetchData.razor b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/FetchData.razor index 5ba2a5eb..d78abebb 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/FetchData.razor +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/FetchData.razor @@ -1,8 +1,5 @@ -@page "/fetchdata" -@using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Components.WebAssembly.Authentication +@page "/fetchdata" @using EqDemo.Shared -@attribute [Authorize] @inject HttpClient Http Weather forecast @@ -45,13 +42,6 @@ else protected override async Task OnInitializedAsync() { - try - { - forecasts = await Http.GetFromJsonAsync("WeatherForecast"); - } - catch (AccessTokenNotAvailableException exception) - { - exception.Redirect(); - } + forecasts = await Http.GetFromJsonAsync("WeatherForecast"); } } diff --git a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Reports.razor b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Reports.razor index ac5ce0a1..3aee8b09 100644 --- a/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Reports.razor +++ b/AspNetCore/Blazor/AdHocReporting.BlazorWasm/Client/Pages/Reports.razor @@ -1,14 +1,8 @@ -@page "/reports" -@using Microsoft.AspNetCore.Authorization -@using Microsoft.AspNetCore.Components.WebAssembly.Authentication -@using Microsoft.AspNetCore.Components.WebAssembly.Authentication.Internal -@attribute [Authorize] +@page "/reports" @implements IAsyncDisposable @inject IJSRuntime JSRuntime @inject NavigationManager NavigationManager -@inject AuthenticationStateProvider AuthenticationStateProvider -@inject IAccessTokenProviderAccessor AccessTokenProviderAccessor