You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Duplicate GET /login endpoints cause AmbiguousMatchException locally #1155
The Blazor Server UI throws Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException when navigating to GET /login locally. The route is registered twice: Components/Pages/Login.razor declares @page /login, and EstateManagementUI.BlazorServer/Common/BoostrapperExtensions.cs maps GET /login inside ConfigureLiveLogin().\n\nImpact: the local live-auth application cannot reach the login page.\n\nProposed fix: keep /login owned by Login.razor and remove the conflicting live-mode MapGet registration. Preserve the OIDC challenge flow through a separate endpoint or page-triggered flow, and add a regression test proving only one GET /login endpoint is registered.
In EstateManagementUI.BlazorServer/Common/BoostrapperExtensions.cs, remove the live-mode app.MapGet("/login", ...) registration that currently issues the OIDC challenge.
Add a distinct live-auth endpoint, for example GET /authentication/login, that issues the same Results.Challenge(...) with the existing OpenID Connect scheme, RedirectUri = "/", and prompt = "login" properties.
Update Components/Pages/Login.razor so /login remains the single Blazor route. In live mode, render or use a link to /authentication/login; in test modes, retain the existing /test-support/login form.
Leave /logout unchanged.
Add a regression test that builds the route table and verifies there is exactly one GET endpoint for /login, while the live challenge endpoint remains available separately.
This keeps /login as the user-facing Blazor page, preserves the OIDC challenge flow, and prevents ASP.NET Core endpoint ambiguity.
Activity
StuartFerguson commentedon Sep 15, 2026
Proposed code change details:
This keeps /login as the user-facing Blazor page, preserves the OIDC challenge flow, and prevents ASP.NET Core endpoint ambiguity.