PostgREST
authupdateSettings function to update user settings in Supabase.supabase.auth.onAuthStateChange to initialize the store (currentTopics, currentLevel, etc.) when a user signs in.onAuthStateChange fires immediately with the existing session, and I see console.log('Updated') to appear even though the user hasn’t actually signed in again (the token already exists).updateSettings after that, it sometimes fails because supabase.auth.getUser() in there may return null or undefined temporarily, depending on how the session is restored.onAuthStateChange?