From 71ba2e0638501ddb1d028a46d6c34c527234e446 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Tissot Date: Wed, 7 Apr 2021 22:58:33 -0400 Subject: [PATCH] Fix startup / dependencies --- .../ClientMigrations.cs | 8 ++++---- .../StatCan.OrchardCore.SaaSConfiguration/Manifest.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Modules/StatCan.OrchardCore.SaaSConfiguration/ClientMigrations.cs b/src/Modules/StatCan.OrchardCore.SaaSConfiguration/ClientMigrations.cs index ea9802149..294cee4bc 100644 --- a/src/Modules/StatCan.OrchardCore.SaaSConfiguration/ClientMigrations.cs +++ b/src/Modules/StatCan.OrchardCore.SaaSConfiguration/ClientMigrations.cs @@ -97,14 +97,11 @@ await shellScope.UsingAsync(async scope => return 0 ; } - await _tenantHelper.EnableFeatureAsync("OrchardCore.OpenId.Client"); - - // Set the OpenId client settings based on var settings = await _openIdClientService.GetSettingsAsync(); settings.Authority = authority; settings.ClientId = saasConfigurationSettings.ClientId; - settings.Scopes = new string[]{OpenIddictConstants.Scopes.Profile, OpenIddictConstants.Scopes.Email}; + settings.Scopes = new string[]{OpenIddictConstants.Scopes.Email}; settings.DisplayName = "Login"; //todo i18n? settings.ResponseType = OpenIdConnectResponseType.Code; settings.ResponseMode = OpenIdConnectResponseMode.FormPost; @@ -117,6 +114,9 @@ await shellScope.UsingAsync(async scope => await _openIdClientService.UpdateSettingsAsync(settings); + // restart the tenant to reload the OpenId connect configuration + await _shellHost.ReleaseShellContextAsync(_shellSettings); + return 1; } } diff --git a/src/Modules/StatCan.OrchardCore.SaaSConfiguration/Manifest.cs b/src/Modules/StatCan.OrchardCore.SaaSConfiguration/Manifest.cs index 7786a121d..384ea38d0 100644 --- a/src/Modules/StatCan.OrchardCore.SaaSConfiguration/Manifest.cs +++ b/src/Modules/StatCan.OrchardCore.SaaSConfiguration/Manifest.cs @@ -22,6 +22,6 @@ Id = Constants.Features.SaaSConfigurationClient, Name = "SaaS Configuration for client tenants", Description = "SaaS tenant automatic configuration. For child tenants.", - Category = "Configuration" - // Dependencies = new[] { "OrchardCore.OpenId.Client" } + Category = "Configuration", + Dependencies = new[] { "OrchardCore.OpenId.Client" } )]