diff --git a/BlazorWasmDemo/Server/Program.cs b/BlazorWasmDemo/Server/Program.cs index 301c0a35..db8efb02 100644 --- a/BlazorWasmDemo/Server/Program.cs +++ b/BlazorWasmDemo/Server/Program.cs @@ -4,11 +4,12 @@ builder.Services.AddControllersWithViews(); builder.Services.AddRazorPages(); +var origin = builder.Configuration["Origin"]; builder.Services.AddFido2(options => { - options.ServerDomain = "localhost"; + options.ServerDomain = origin; options.ServerName = "FIDO2 Server"; - options.Origins = builder.Configuration["origins"].Split(';').ToHashSet(); + options.Origins = new HashSet { origin }; options.TimestampDriftTolerance = 1000; }); builder.Services.AddSwaggerGen(opts => diff --git a/BlazorWasmDemo/Server/appsettings.json b/BlazorWasmDemo/Server/appsettings.json index a7a5b7e5..d869b929 100644 --- a/BlazorWasmDemo/Server/appsettings.json +++ b/BlazorWasmDemo/Server/appsettings.json @@ -6,5 +6,5 @@ } }, "AllowedHosts": "*", - "Origins": "https://localhost:7124;https://localhost:5001;https://blazor-webauthn.onrender.com" + "Origin": "https://fido2-blazorwasm.onrender.com" }