test auth stuff
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user