diff --git a/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor b/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor index 85e3c7c..d7f9032 100644 --- a/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor +++ b/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor @@ -16,16 +16,32 @@ } else { -
-
+ + } diff --git a/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor.css b/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor.css new file mode 100644 index 0000000..adccda8 --- /dev/null +++ b/src/BirthList.Web/Components/Account/Shared/ExternalLoginPicker.razor.css @@ -0,0 +1,29 @@ +.external-login-form { + display: block; +} + +.external-login-actions { + display: flex; + flex-direction: column; + gap: 0.75rem; + align-items: flex-start; +} + +.external-login-btn { + padding: 0; + border: none; + background: transparent; + line-height: 0; + border-radius: 4px; +} + +.external-login-btn img { + height: 40px; + width: auto; + display: block; +} + +.external-login-btn:focus-visible { + outline: 2px solid #0d6efd; + outline-offset: 2px; +} diff --git a/src/BirthList.Web/Program.cs b/src/BirthList.Web/Program.cs index a412e7f..9c267c0 100644 --- a/src/BirthList.Web/Program.cs +++ b/src/BirthList.Web/Program.cs @@ -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(builder.Configuration.GetSection("Smtp")); +builder.Services.Configure(options => +{ + options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; + options.KnownNetworks.Clear(); + options.KnownProxies.Clear(); +}); + builder.Services.AddCascadingAuthenticationState(); builder.Services.AddScoped(); builder.Services.AddScoped(); @@ -150,6 +158,7 @@ else app.UseHsts(); } +app.UseForwardedHeaders(); app.UseHttpsRedirection(); app.UseStaticFiles(); diff --git a/src/BirthList.Web/wwwroot/.well-known/microsoft-identity-association.json b/src/BirthList.Web/wwwroot/.well-known/microsoft-identity-association.json new file mode 100644 index 0000000..670c140 --- /dev/null +++ b/src/BirthList.Web/wwwroot/.well-known/microsoft-identity-association.json @@ -0,0 +1,7 @@ +{ + "associatedApplications": [ + { + "applicationId": "5c54d048-dc3e-4d90-a29f-b96b9601fe18" + } + ] +} \ No newline at end of file diff --git a/src/BirthList.Web/wwwroot/signin/google-signin.svg b/src/BirthList.Web/wwwroot/signin/google-signin.svg new file mode 100644 index 0000000..74b3e5c --- /dev/null +++ b/src/BirthList.Web/wwwroot/signin/google-signin.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/BirthList.Web/wwwroot/signin/microsoft-signin.svg b/src/BirthList.Web/wwwroot/signin/microsoft-signin.svg new file mode 100644 index 0000000..a5fa6ea --- /dev/null +++ b/src/BirthList.Web/wwwroot/signin/microsoft-signin.svg @@ -0,0 +1 @@ +MS-SymbolLockup \ No newline at end of file