diff --git a/SS14.Admin/Startup.cs b/SS14.Admin/Startup.cs index 1b36179..673e1b1 100644 --- a/SS14.Admin/Startup.cs +++ b/SS14.Admin/Startup.cs @@ -70,6 +70,16 @@ public void ConfigureServices(IServiceCollection services) options.Scope.Add("profile"); options.GetClaimsFromUserInfoEndpoint = true; + options.Events.OnRedirectToIdentityProvider = context => + { + if (context.ProtocolMessage.RedirectUri.StartsWith("http://")) + { + context.ProtocolMessage.RedirectUri = string.Concat("https://", + context.ProtocolMessage.RedirectUri.AsSpan("http://".Length)); + } + return Task.CompletedTask; + }; + options.Events.OnTokenValidated = async ctx => { var handler = ctx.HttpContext.RequestServices.GetRequiredService();