From 3f0ec12ae7ef8ad8fc1cce6ad1db6c322ca56fcc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 Jul 2026 13:21:20 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=94=EB=A1=A0=20SSO=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EC=BF=A0=ED=82=A4=20=EC=A0=80=EC=9E=A5=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- auth/callback.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/auth/callback.php b/auth/callback.php index 6ec2c31..70b54ae 100644 --- a/auth/callback.php +++ b/auth/callback.php @@ -105,8 +105,14 @@ setcookie('descope_user_email', '', auth_cookie_options(time() - 42000)); setcookie('descope_user_phone', '', auth_cookie_options(time() - 42000)); setcookie('descope_custom_attributes', '', auth_cookie_options(time() - 42000)); setcookie('descope_role_names', '', auth_cookie_options(time() - 42000)); -auth_set_descope_session_cookies($normalizedUser); -auth_set_baron_session_cookies($normalizedUser, $claims); +setcookie('baron_user', '', auth_cookie_options(time() - 42000)); +setcookie('baron_claims', '', auth_cookie_options(time() - 42000)); +setcookie('baron_provider', '', auth_cookie_options(time() - 42000)); + +// BARON users are kept in the server-side PHP session above. Do not mirror +// the normalized user and the complete OIDC claims into cookies: the claims +// may contain a large tenants/roles payload and make the next Cookie header +// exceed Apache's request-header limit for only some accounts. $clientSessionPayload = [ 'loginId' => (string) ($normalizedUser['loginIds'][0] ?? ''), @@ -121,7 +127,6 @@ $clientSessionPayload = [ 'userRole' => (string) (($normalizedUser['roleNames'][0] ?? '')), 'authProvider' => 'baron', 'sessionJwt' => $idToken !== '' ? $idToken : (string) ($tokenData['access_token'] ?? ''), - 'baronClaims' => json_encode($claims, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), ]; $jsonPayload = json_encode($clientSessionPayload, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); @@ -154,6 +159,9 @@ echo <<