From 703ef2cd565de0d9317e07a68bed56822a3fc7ce Mon Sep 17 00:00:00 2001 From: heheer Date: Mon, 20 Oct 2025 14:44:49 +0800 Subject: [PATCH] add 10-minute auto-refresh for token login (#5788) --- projects/app/src/components/Layout/auth.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/app/src/components/Layout/auth.tsx b/projects/app/src/components/Layout/auth.tsx index eda9674a7..5d717d045 100644 --- a/projects/app/src/components/Layout/auth.tsx +++ b/projects/app/src/components/Layout/auth.tsx @@ -26,13 +26,14 @@ const Auth = ({ children }: { children: JSX.Element | React.ReactNode }) => { useQuery( [router.pathname], () => { - if (unAuthPage[router.pathname] === true || userInfo) { + if (unAuthPage[router.pathname] === true) { return null; } else { return initUserInfo(); } }, { + refetchInterval: 10 * 60 * 1000, onError(error) { console.log('error->', error); router.replace(