fix: set cookie Path value when user login with sso

pull/21166/head
NFish 11 months ago
parent c5acffb034
commit 9c0205c6cb

@ -6,6 +6,7 @@ on:
- "main" - "main"
- "deploy/dev" - "deploy/dev"
- "deploy/enterprise" - "deploy/enterprise"
- "e-300-test"
tags: tags:
- "*" - "*"

@ -34,7 +34,7 @@ const SSOAuth: FC<SSOAuthProps> = ({
} }
else if (protocol === SSOProtocol.OIDC) { else if (protocol === SSOProtocol.OIDC) {
getUserOIDCSSOUrl(invite_token).then((res) => { getUserOIDCSSOUrl(invite_token).then((res) => {
document.cookie = `user-oidc-state=${res.state}` document.cookie = `user-oidc-state=${res.state};Path=/`
router.push(res.url) router.push(res.url)
}).finally(() => { }).finally(() => {
setIsLoading(false) setIsLoading(false)
@ -42,7 +42,7 @@ const SSOAuth: FC<SSOAuthProps> = ({
} }
else if (protocol === SSOProtocol.OAuth2) { else if (protocol === SSOProtocol.OAuth2) {
getUserOAuth2SSOUrl(invite_token).then((res) => { getUserOAuth2SSOUrl(invite_token).then((res) => {
document.cookie = `user-oauth2-state=${res.state}` document.cookie = `user-oauth2-state=${res.state};Path=/`
router.push(res.url) router.push(res.url)
}).finally(() => { }).finally(() => {
setIsLoading(false) setIsLoading(false)

Loading…
Cancel
Save