Attempts to refresh the access token using the refresh token.
Updates both in-memory tokens (via TokenManager) and the session cookie.
Concurrent callers are automatically deduplicated: if a refresh is already
in progress every additional caller awaits the same promise rather than
issuing a second request that would invalidate the first one.
Cross-tab coordination is handled by TokenManager via BroadcastChannel:
if another tab already refreshed the token, this will detect the updated
cookie and adopt the new tokens without making a redundant network call.
Attempts to refresh the access token using the refresh token. Updates both in-memory tokens (via TokenManager) and the session cookie.
Concurrent callers are automatically deduplicated: if a refresh is already in progress every additional caller awaits the same promise rather than issuing a second request that would invalidate the first one.
Cross-tab coordination is handled by TokenManager via BroadcastChannel: if another tab already refreshed the token, this will detect the updated cookie and adopt the new tokens without making a redundant network call.