diff --git a/samples/ManagementSite/Alloy.ManagementSite.csproj b/samples/ManagementSite/Alloy.ManagementSite.csproj index a722db2..d24774f 100644 --- a/samples/ManagementSite/Alloy.ManagementSite.csproj +++ b/samples/ManagementSite/Alloy.ManagementSite.csproj @@ -5,8 +5,8 @@ 12.30.0 12.21.4 1.0.0 - 12.20.1 5.9.0 + 3.10.2 @@ -30,7 +30,8 @@ - + + diff --git a/samples/ManagementSite/Startup.cs b/samples/ManagementSite/Startup.cs index c8c513a..e5f55f4 100644 --- a/samples/ManagementSite/Startup.cs +++ b/samples/ManagementSite/Startup.cs @@ -23,6 +23,7 @@ using EPiServer.DependencyInjection; using Optimizely.Cms.Forms.DependencyInjection; using Optimizely.Cms.Forms; +using EPiServer.Cms.Shell.UI; namespace Alloy.ManagementSite { @@ -46,7 +47,6 @@ public void ConfigureServices(IServiceCollection services) if (_environment.IsDevelopment()) { //NETCORE: Consider add appsettings support for this - services.Configure(o => { o.OnPrepareResponse = context => @@ -88,7 +88,9 @@ public void ConfigureServices(IServiceCollection services) .Configure(options => options.OptimizeForDelivery = true) .ConfigureDisplayOptions() .AddContentDelivery(managementSiteOptions) - .ConfigureDxp(managementSiteOptions, _configuration); + .ConfigureDxp(managementSiteOptions, _configuration) + .AddAdminUserRegistration(options => options.Behavior = RegisterAdminUserBehaviors.Enabled | + RegisterAdminUserBehaviors.LocalRequestsOnly); services.AddCors(opts => { @@ -194,6 +196,14 @@ public void PostConfigure(string name, OptimizelyFormsServiceOptions options) client.EncryptionKeys.Add(key); } } + + foreach (var client in options.OpenIDConnectClients) + { + foreach (var key in _options.SigningCredentials.Select(c => c.Key)) + { + client.SigningKeys.Add(key); + } + } } } }