test auth fix idk
All checks were successful
CI/CD Pipeline / Build and Push App Docker Image (push) Successful in 2m34s
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Successful in 8s
CI/CD Pipeline / Deploy to Kubernetes (push) Successful in 47s

This commit is contained in:
yohlo
2026-03-02 10:02:13 -06:00
parent 3909fbc966
commit 6fddbbab68
5 changed files with 84 additions and 68 deletions

View File

@@ -122,26 +122,12 @@ export const Route = createRootRouteWithContext<{
context.queryClient,
playerQueries.auth()
);
console.log('__root beforeLoad auth data:', auth);
return { auth };
} catch (error: any) {
if (typeof window !== 'undefined') {
const { doesSessionExist } = await import('supertokens-web-js/recipe/session');
const { refreshManager } = await import('@/lib/supertokens/refresh-manager');
const sessionExists = await doesSessionExist();
if (sessionExists) {
try {
await refreshManager.refresh();
const auth = await ensureServerQueryData(
context.queryClient,
playerQueries.auth()
);
return { auth };
} catch {
return {};
}
}
}
console.error('__root beforeLoad error:', error);
return {};
}
},