diff --git a/bitwarden_license/src/Portal/Startup.cs b/bitwarden_license/src/Portal/Startup.cs index 670eb51942..ccd8c6fb75 100644 --- a/bitwarden_license/src/Portal/Startup.cs +++ b/bitwarden_license/src/Portal/Startup.cs @@ -10,6 +10,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using System; namespace Bit.Portal { @@ -60,6 +61,15 @@ namespace Bit.Portal services.AddDefaultServices(globalSettings); services.AddCoreLocalizationServices(); + // Fido2 + services.AddFido2(options => + { + options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host; + options.ServerName = "Bitwarden"; + options.Origin = globalSettings.BaseServiceUri.Vault; + options.TimestampDriftTolerance = 300000; + }); + // Mvc services.AddControllersWithViews() .AddViewAndDataAnnotationLocalization(); diff --git a/bitwarden_license/src/Sso/Startup.cs b/bitwarden_license/src/Sso/Startup.cs index 5678dace21..dfac772cc1 100644 --- a/bitwarden_license/src/Sso/Startup.cs +++ b/bitwarden_license/src/Sso/Startup.cs @@ -59,6 +59,15 @@ namespace Bit.Sso }); } + // Fido2 + services.AddFido2(options => + { + options.ServerDomain = new Uri(globalSettings.BaseServiceUri.Vault).Host; + options.ServerName = "Bitwarden"; + options.Origin = globalSettings.BaseServiceUri.Vault; + options.TimestampDriftTolerance = 300000; + }); + // Authentication services.AddDistributedIdentityServices(globalSettings); services.AddAuthentication()