App chrash + seo

This commit is contained in:
2026-05-10 22:37:01 +02:00
parent 9386ae1be7
commit 2658c37453
28 changed files with 13232 additions and 519 deletions

View File

@@ -96,11 +96,15 @@ export const AuthService = {
const raw = await SecureStore.getItemAsync(SESSION_KEY);
if (!raw) return null;
const parsed = JSON.parse(raw) as Partial<AuthSession>;
if (!parsed.token || !parsed.serverUserId || !parsed.userId) {
await clearStoredSession();
return null;
}
return parsed as AuthSession;
if (!parsed.token || !parsed.serverUserId || !parsed.userId) {
await clearStoredSession();
return null;
}
if (!AuthDb.getUserById(parsed.userId)) {
await clearStoredSession();
return null;
}
return parsed as AuthSession;
} catch {
await clearStoredSession();
return null;