{"version":"2.1.242","anchor":"token-refresh-and-session-state-read-from-an-explicit-storag","canonical_anchor":"token-refresh-and-session-state-read-from-an-explicit-storag","heading":"Token refresh and session state read from an explicit storage handle","tier":"internal","area":"Auth","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242\/e\/token-refresh-and-session-state-read-from-an-explicit-storag","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.242","markdown":"### Token refresh and session state read from an explicit storage handle\n\nToken refresh, logout, onboarding reset and plugin loading now take a storage handle rather than global state.\n\n**What**\n\n`checkAndRefreshOAuthTokenIfNeeded` now receives a v5 storage handle alongside credentials, and the same pair travels through hook execution, session-team registration, logout and onboarding reset, plugin loading and the file-history writers. Login state can therefore live in that store rather than in process-wide state.\n\n**Evidence**\n\n`checkAndRefreshOAuthTokenIfNeeded`\n\n- Area: Auth\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 3\/5"}