From d3d24c12e5d9106ab5943b15756917fd48bf345c Mon Sep 17 00:00:00 2001 From: plockwood Date: Fri, 20 Jan 2023 09:47:31 +0000 Subject: [PATCH 1/2] attempt to resolve the authentication correlation issue --- Dfe.Academies.External.Web/Program.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dfe.Academies.External.Web/Program.cs b/Dfe.Academies.External.Web/Program.cs index 30eee2b4a..48b80172f 100644 --- a/Dfe.Academies.External.Web/Program.cs +++ b/Dfe.Academies.External.Web/Program.cs @@ -68,7 +68,8 @@ options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; }) - .AddCookie() + // test to see if this resolves the correlation problem + .AddCookie(opt => opt.Cookie.SameSite = SameSiteMode.None) .AddOpenIdConnect(options => { options.ClientId = configuration["SignIn:OneloginOpenIdConnectClientId"]; @@ -102,6 +103,12 @@ context.ProtocolMessage.Prompt = "login"; return Task.CompletedTask; }; + + options.Events.OnTokenResponseReceived = context => + { + + return Task.CompletedTask; + }; } ); From a6f17648e6fc95b9c6dfa1811d16da82b3bdd0d4 Mon Sep 17 00:00:00 2001 From: plockwood Date: Fri, 20 Jan 2023 09:48:05 +0000 Subject: [PATCH 2/2] remove debug code --- Dfe.Academies.External.Web/Program.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Dfe.Academies.External.Web/Program.cs b/Dfe.Academies.External.Web/Program.cs index 48b80172f..2abba91b2 100644 --- a/Dfe.Academies.External.Web/Program.cs +++ b/Dfe.Academies.External.Web/Program.cs @@ -103,12 +103,6 @@ context.ProtocolMessage.Prompt = "login"; return Task.CompletedTask; }; - - options.Events.OnTokenResponseReceived = context => - { - - return Task.CompletedTask; - }; } );