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

@ -10,7 +10,7 @@ export const getInitialTokenV2 = (): Record<string, any> => ({
version: 2,
})
export const checkOrSetAccessToken = async (appCode?: string) => {
export const checkOrSetAccessToken = async (appCode?: string | null) => {
const sharedToken = appCode || globalThis.location.pathname.split('/').slice(-1)[0]
const userId = (await getProcessedSystemVariablesFromUrlParams()).user_id
const accessToken = localStorage.getItem('token') || JSON.stringify(getInitialTokenV2())