Skip to content

Stale profile data in dashboard after sign-out and sign-in #60

Description

@mojoro

Bug

The profile selector on the dashboard shows profiles from the previous account if you sign out and sign back in as a different user. The Zustand store retains cached data from the prior session.

Expected behavior

All client-side user data should be cleared on sign-out. The dashboard should load fresh data for the new user.

Root cause

The Zustand store is not reset when the Clerk session changes. Cached profile data, feed state, and any other user-scoped data persists in memory across sign-out/sign-in cycles.

Fix

  • Reset the Zustand store completely on sign-out (clear all user-scoped state)
  • Clear any other cached user data (React Query cache, prefetched data, etc.)
  • This should trigger on Clerk's sign-out event, before the redirect to the sign-in page

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions