Perf/web app authrozation (#22524)

This commit is contained in:
NFish 2025-07-17 10:52:10 +08:00 • committed by GitHub
commit a324d3942e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 592 additions and 441 deletions

View file

@ -413,7 +413,7 @@ export const ssePost = async (
if (data.code === 'unauthorized') {
removeAccessToken()
globalThis.location.reload()
requiredWebSSOLogin()
}
}
})
@ -507,7 +507,7 @@ export const request = async<T>(url: string, options = {}, otherOptions?: IOther
} = otherOptionsForBaseFetch
if (isPublicAPI && code === 'unauthorized') {
removeAccessToken()
globalThis.location.reload()
requiredWebSSOLogin()
return Promise.reject(err)
}
if (code === 'init_validate_failed' && IS_CE_EDITION && !silent) {