From 6558ed9b0ca4c0d00fae17a7c6aa18f01b37a075 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 8 Sep 2021 17:49:56 +0200 Subject: [PATCH] Changes SchemeForBackOffice to just ensure it is prefixed with "Umbraco.". https://github.com/umbraco/UmbracoDocs/pull/3438#discussion_r703981003 --- .../Security/BackOfficeAuthenticationBuilder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.BackOffice/Security/BackOfficeAuthenticationBuilder.cs b/src/Umbraco.Web.BackOffice/Security/BackOfficeAuthenticationBuilder.cs index bc9f64129f..80a9d920a1 100644 --- a/src/Umbraco.Web.BackOffice/Security/BackOfficeAuthenticationBuilder.cs +++ b/src/Umbraco.Web.BackOffice/Security/BackOfficeAuthenticationBuilder.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; +using Umbraco.Extensions; using Constants = Umbraco.Cms.Core.Constants; namespace Umbraco.Cms.Web.BackOffice.Security @@ -22,7 +23,7 @@ namespace Umbraco.Cms.Web.BackOffice.Security => _loginProviderOptions = loginProviderOptions ?? (x => { }); public string SchemeForBackOffice(string scheme) - => Constants.Security.BackOfficeExternalAuthenticationTypePrefix + scheme; + => scheme?.EnsureStartsWith(Constants.Security.BackOfficeExternalAuthenticationTypePrefix); /// /// Overridden to track the final authenticationScheme being registered for the external login