From a55d86996c50de7fa10913ebffe252b01a60b0cc Mon Sep 17 00:00:00 2001 From: NFish Date: Wed, 18 Jun 2025 11:18:11 +0800 Subject: [PATCH] fix: set cookie Path value when user login with sso --- web/app/signin/components/sso-auth.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app/signin/components/sso-auth.tsx b/web/app/signin/components/sso-auth.tsx index fb303b93e2..6a248fc2d2 100644 --- a/web/app/signin/components/sso-auth.tsx +++ b/web/app/signin/components/sso-auth.tsx @@ -34,7 +34,7 @@ const SSOAuth: FC = ({ } else if (protocol === SSOProtocol.OIDC) { getUserOIDCSSOUrl(invite_token).then((res) => { - document.cookie = `user-oidc-state=${res.state}` + document.cookie = `user-oidc-state=${res.state};Path=/` router.push(res.url) }).finally(() => { setIsLoading(false) @@ -42,7 +42,7 @@ const SSOAuth: FC = ({ } else if (protocol === SSOProtocol.OAuth2) { getUserOAuth2SSOUrl(invite_token).then((res) => { - document.cookie = `user-oauth2-state=${res.state}` + document.cookie = `user-oauth2-state=${res.state};Path=/` router.push(res.url) }).finally(() => { setIsLoading(false)