[BUG] Multi-tab session sync doesn't propagate a logout performed in one tab to other open tabs

Open Beginner friendly
#995 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Read the auth logout path and the existing login state sync that uses storage events. Check how logout clears local storage and compare it with that sync mechanism; done means another open tab updates its auth state immediately after logout. The issue does not name specific files or tests, so locate them from those entry points.

Written by the indexing model from the issue text.

Description

bug difficulty: easy good first issue priority: medium sdk security

Description

Logging out in one browser tab clears that tab's in-memory SDK state, but other open tabs with their own SDK client instance keep believing the session is active until they happen to make a call that fails, rather than being notified immediately via the storage-event mechanism other state changes use.

Component

auth

Steps to Reproduce

  1. Open the app in two browser tabs, both authenticated.
  2. Log out in tab A.
  3. Check tab B's apparent auth state without refreshing.

Expected Behavior

Logout should broadcast via the same cross-tab storage-event mechanism used for other session state changes, so all open tabs update immediately.

Actual Behavior

Other open tabs have no idea a logout happened until their next failed API call, which is a confusing stale-state window.

Environment

  • SDK version: 0.3.x
  • Node version: 20.x, 22.x
  • OS: macOS / Linux
  • Network: TESTNET

Code Example

// Not applicable — reproduced via API inspection, not a standalone snippet.

Error Output

The logout path clears local storage but doesn't explicitly dispatch/rely on a storage event the way login state sync does elsewhere.

Difficulty

🟢 Easy

Additional Context

Ensure logout triggers the same cross-tab storage-event propagation used for other auth-state changes.

Dominant language
TypeScript
Stars
0
Forks
73
Avg merge
6h 26m
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from trustflow-protocol/trustflow-sdk

All issues in trustflow-protocol/trustflow-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.