From 3b52ba3ba2139335da5f57159002c7473b22e04d Mon Sep 17 00:00:00 2001 From: NFish Date: Wed, 4 Jun 2025 10:53:22 +0800 Subject: [PATCH] fix: web app auto login --- web/app/(shareLayout)/webapp-signin/layout.tsx | 2 +- web/app/components/share/utils.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/app/(shareLayout)/webapp-signin/layout.tsx b/web/app/(shareLayout)/webapp-signin/layout.tsx index 26f8ad8690..e1fd16d715 100644 --- a/web/app/(shareLayout)/webapp-signin/layout.tsx +++ b/web/app/(shareLayout)/webapp-signin/layout.tsx @@ -12,7 +12,7 @@ export default function SignInLayout({ children }: any) {
{/*
*/}
-
+
{children}
diff --git a/web/app/components/share/utils.ts b/web/app/components/share/utils.ts index feb9e204c4..d793d48b48 100644 --- a/web/app/components/share/utils.ts +++ b/web/app/components/share/utils.ts @@ -25,7 +25,8 @@ export const checkOrSetAccessToken = async (appCode?: string) => { } if (!accessTokenJson[sharedToken]?.[userId || 'DEFAULT']) { - const res = await fetchAccessToken({ appCode: sharedToken, userId }) + const webAppAccessToken = localStorage.getItem('webapp_access_token') + const res = await fetchAccessToken({ appCode: sharedToken, userId, webAppAccessToken }) accessTokenJson[sharedToken] = { ...accessTokenJson[sharedToken], [userId || 'DEFAULT']: res.access_token,