debug: auth

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-18 11:04:00 +02:00
parent 93a3c9b0a9
commit 967a155d5e
4 changed files with 8 additions and 15 deletions

View File

@@ -42,15 +42,9 @@ export const Route = createRootRouteWithContext<MyRouterContext>()({
beforeLoad: async ({ context }) => {
const [session, cookies] = await Promise.all([
context.queryClient.ensureQueryData(
context.trpc.auth.session.queryOptions(undefined, {
staleTime: 1000 * 60 * 5,
gcTime: 1000 * 60 * 10,
refetchOnWindowFocus: false,
refetchOnMount: false,
refetchOnReconnect: false,
}),
context.trpc.auth.session.queryOptions(),
),
getCookiesFn(),
getCookiesFn().catch(() => ({}) as Record<string, string>),
]);
return { session, cookies };