Skip to content

Sign-in markers: a tab's write erases sign-ins other tabs added, so app sign-out can skip their logout #1968

Closed

Description

@dawsontoth

What happens

Each tab keeps a map of the entities it holds a remembered sign-in for, in localStorage. flagKeyAsSignedIn and flagKeyAsSignedOut (src/features/auth/store/authStore.ts) write that map back whole, from the copy this tab loaded at startup. A sign-in another tab added after that is erased by this tab's next sign-in or sign-out of anything.

The erased marker is what app sign-out uses to know which instances to log out of. So after it's lost:

It takes two tabs, with a sign-in in one and any sign-in or sign-out in the other before a reload.

Related, from the same review of #1966: terminating a Fabric cluster (terminateCluster.ts) forgets this tab's sign-ins but not markers another tab added, so those outlive the forget. The same fix should cover that path.

Fix direction

  • Read the current map from storage at each write, change one key, and write it back, instead of writing a startup copy.
  • Have app sign-out log out every marker it finds in storage, not only the ones this tab holds in memory.
  • Keep the two-tabs-write-at-once race in mind; a write per key, or a lock, closes it.

Review-Deferral: be82d5c881a51a56 severity=minor category=security
Review-Deferral: afad652932df433c severity=nit category=reliability

Raised by the cross-model review of #1966 (#1931). Pre-existing; not introduced there.

🤖 Generated by Anthropic Claude Code (Claude Opus 5.5); posted via @dawsontoth.

Activity

  1. added theissue type on Oct 15, 2026
  2. added a commit that references this issue on Oct 15, 2026
    912c420
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions