From 613edab908df4dfef6c5a7be3fa021353261e218 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 31 Aug 2020 18:25:27 -0400 Subject: [PATCH] adjusting config --- src/Identity/Startup.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Identity/Startup.cs b/src/Identity/Startup.cs index c27d7b6c71..6f8fed160c 100644 --- a/src/Identity/Startup.cs +++ b/src/Identity/Startup.cs @@ -90,10 +90,6 @@ namespace Bit.Identity options.Authority = globalSettings.BaseServiceUri.Sso; options.MetadataAddress = globalSettings.BaseServiceUri.InternalSso + "/.well-known/openid-configuration"; - options.Configuration = new OpenIdConnectConfiguration - { - AuthorizationEndpoint = globalSettings.BaseServiceUri.Sso + "/connect/authorize" - }; options.RequireHttpsMetadata = !Environment.IsDevelopment() && globalSettings.BaseServiceUri.InternalIdentity.StartsWith("https"); options.ClientId = "oidc-identity"; @@ -148,12 +144,16 @@ namespace Bit.Identity GlobalSettings globalSettings, ILogger logger) { - var identityUri = new Uri(globalSettings.BaseServiceUri.Identity); - app.Use(async (ctx, next) => + if (globalSettings.SelfHosted) { - //ctx.SetIdentityServerOrigin($"{identityUri.Scheme}://{identityUri.Host}"); - await next(); - }); + var identityUri = new Uri(globalSettings.BaseServiceUri.Identity); + app.Use(async (ctx, next) => + { + ctx.SetIdentityServerOrigin($"{identityUri.Scheme}://{identityUri.Host}"); + ctx.SetIdentityServerBasePath(identityUri.LocalPath); + await next(); + }); + } IdentityModelEventSource.ShowPII = true;