fix session expiring on hotreload, wait for pocketbase client to fully initialize on auth

This commit is contained in:
yohlo
2025-08-20 23:12:35 -05:00
parent 311b8581ad
commit 5f5d9582f2
2 changed files with 5 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ export const fetchMe = createServerFn().handler(async () => {
if (!data || !data.userAuthId) return { user: undefined, roles: [], metadata: {} };
try {
await pbAdmin.authPromise;
const result = await pbAdmin.getPlayerByAuthId(data.userAuthId);
logger.info('Fetched player', result);
return {