Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Update root.tsx

varonix0700c4a30c3c9
diff --git a/frontend/src/pages/root.tsx b/frontend/src/pages/root.tsx
index a913c4df22..3533030158 100644
--- a/frontend/src/pages/root.tsx
+++ b/frontend/src/pages/root.tsx
@@ -27,13 +27,11 @@ const RootPage = () => {
export const Route = createRootRouteWithContext<TRouterContext>()({
component: RootPage,
beforeLoad: async ({ context }) => {
- // Seed the in-memory access token from the refresh cookie before any
- // boot-time API calls, so /admin/config goes out with the Bearer header if present
await context.queryClient
.fetchQuery({
queryKey: authKeys.getAuthToken,
queryFn: fetchAuthToken,
- staleTime: 0
+ staleTime: Infinity
})
.catch(() => {
// No valid refresh cookie — boot continues unauthenticated.