Enhance external login and proxy compatibility
Build and Push Docker Image / build-and-push (push) Successful in 22s

- Updated `ExternalLoginPicker.razor` to add Google and Microsoft login buttons with SVG icons and improved styling.
- Added new styles in `ExternalLoginPicker.razor.css` for layout and accessibility.
- Configured `ForwardedHeadersOptions` and enabled `UseForwardedHeaders` middleware in `Program.cs` for reverse proxy support.
- Added `AddCascadingAuthenticationState` for better authentication state management.
- Included `microsoft-identity-association.json` for Microsoft app association.
- Added `google-signin.svg` and `microsoft-signin.svg` assets for login buttons.
This commit is contained in:
Arne Moerman
2026-05-17 14:49:52 +02:00
parent b46269bfc0
commit 6b593828d7
6 changed files with 82 additions and 5 deletions
+9
View File
@@ -4,6 +4,7 @@ using BirthList.Web.Configuration;
using BirthList.Web.Features.Registries;
using BirthList.Web.Services;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
@@ -25,6 +26,13 @@ builder.Services.AddHttpClient("RegistryMetadata", client =>
});
builder.Services.Configure<SmtpOptions>(builder.Configuration.GetSection("Smtp"));
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
options.KnownNetworks.Clear();
options.KnownProxies.Clear();
});
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddScoped<IdentityUserAccessor>();
builder.Services.AddScoped<IdentityRedirectManager>();
@@ -150,6 +158,7 @@ else
app.UseHsts();
}
app.UseForwardedHeaders();
app.UseHttpsRedirection();
app.UseStaticFiles();