test auth stuff

This commit is contained in:
yohlo
2026-03-02 09:43:46 -06:00
parent 74d83da466
commit 3909fbc966
12 changed files with 255 additions and 152 deletions

View File

@@ -125,12 +125,13 @@ export const Route = createRootRouteWithContext<{
return { auth };
} catch (error: any) {
if (typeof window !== 'undefined') {
const { doesSessionExist, attemptRefreshingSession } = await import('supertokens-web-js/recipe/session');
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 attemptRefreshingSession();
await refreshManager.refresh();
const auth = await ensureServerQueryData(
context.queryClient,
playerQueries.auth()