Fix: resolve authentication state pollution and subscription leaks - #132
Open
addiinnocent wants to merge 11 commits into
Open
Fix: resolve authentication state pollution and subscription leaks#132addiinnocent wants to merge 11 commits into
addiinnocent wants to merge 11 commits into
Conversation
- Updated .claude/settings and .gitignore - Modified sphere InfoView and server index.html - Added server application files and configuration - Added compiled assets from build
- Fix isAuthenticated reactive computation to properly track login state - Implement proper Gun.js subscription cleanup with .off() instead of callbacks - Store Gun references (userRef, profilesRef) instead of trying to store unsubscribe functions - Fix logout to properly unsubscribe from user and profiles before clearing state - Guard against writing null values to Gun.js during logout - Add 500ms sync delay between register and login to ensure credentials are written - Remove hardcoded test emails from PasskeyView and RegisterView - Store registration email in sessionStorage to pass to PasskeyView - Fix missing useUser() import in SettingsView - Add console logging for logout flow debugging This fixes issues where: - Logging out and back in would show profiles from previous account - Logout button wouldn't work due to incorrect unsubscribe handling - Multiple logins without logout would stack subscriptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
isAuthenticatedcomputed property that wasn't tracking login state.off()instead of callback functionsTechnical
userRef,profilesRef) instead of unsubscribe functions.off()method for proper unsubscribeTesting
Breaking Changes
None
Related Issues
Fixes logout functionality and authentication state pollution issues