confluentinc / confluentinc/vscode
Switching CCloud orgs requires unnecessary sign-in step
- Dominant language
- TypeScript
- Stars
- 34
- Forks
- 17
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
Switching orgs now shows a "Your Confluent Cloud session has expired. Please sign in again to continue." info notification, and it doesn't _look_ like you're signed in to the new CCloud organization:
Logs after completing the organization switch
```
2026-01-28 14:55:30.331 [debug] [telemetry.events] User event {"event":"Command Invoked","data":{"command":"confluent.organizations.use","resourceConnectionType":"CCLOUD","resourceId":"vscode-confluent-cloud-connection"}}
2026-01-28 14:55:33.221 [debug] [sidecar.connections] updated connection: {"id":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:33.222 [warning] [sidecar.connections.ccloud] clearing current CCloud resources from extension state
2026-01-28 14:55:33.226 [debug] [sidecar.connections.watcher] ConnectionStateWatcher: received DISCONNECTED event for connection id vscode-confluent-cloud-connection
2026-01-28 14:55:33.226 [debug] [sidecar.connections.statusUtils] connectionEventHandler: ccloud connection update received, passing to handleUpdatedConnection()
2026-01-28 14:55:33.226 [debug] [sidecar.connections.watcher] ConnectionStateWatcher: received UPDATED event for connection id vscode-confluent-cloud-connection
2026-01-28 14:55:33.226 [debug] [sidecar.connections.statusUtils] connectionEventHandler: ccloud connection update received, passing to handleUpdatedConnection()
2026-01-28 14:55:33.230 [debug] [authn.ccloudStateHandling] received update to CCloud connection {"currentState":"NONE","previousState":"SUCCESS"}
2026-01-28 14:55:33.233 [debug] [authn.ccloudStateHandling] received update to CCloud connection {"currentState":"NONE","previousState":"SUCCESS"}
2026-01-28 14:55:33.241 [debug] [authn.ccloudProvider] storage change detected for key: ccloudState
2026-01-28 14:55:33.243 [debug] [authn.ccloudStateHandling] CCloud connected state transition: SUCCESS -> NONE
2026-01-28 14:55:33.243 [debug] [authn.ccloudProvider] ccloudAuthSessionInvalidated event fired
2026-01-28 14:55:33.243 [debug] [authn.ccloudProvider] handleSessionRemoved() {"updateSecret":true}
2026-01-28 14:55:33.243 [debug] [authn.ccloudStateHandling] CCloud session expired, prompting for reauthentication
2026-01-28 14:55:33.244 [debug] [authn.ccloudStateHandling] CCloud connected state transition: SUCCESS -> NONE
2026-01-28 14:55:33.244 [debug] [authn.ccloudProvider] ccloudAuthSessionInvalidated event fired
2026-01-28 14:55:33.244 [debug] [authn.ccloudProvider] handleSessionRemoved() {"updateSecret":true}
2026-01-28 14:55:33.244 [debug] [authn.ccloudStateHandling] CCloud session expired, prompting for reauthentication
2026-01-28 14:55:33.248 [warning] [sidecar.connections.ccloud] clearing current CCloud resources from extension state
2026-01-28 14:55:33.248 [warning] [sidecar.connections.ccloud] clearing current CCloud resources from extension state
2026-01-28 14:55:33.263 [debug] [authn.ccloudProvider] handleSessionRemoved(): no cached `_session` to remove; this shouldn't happen
2026-01-28 14:55:33.274 [debug] [authn.ccloudProvider] storage change detected for key: authSessionExists
2026-01-28 14:55:33.274 [debug] [authn.ccloudProvider] handleSessionSecretChange()
2026-01-28 14:55:33.275 [debug] [viewProviders.resources] Refreshing connection {"connectionId":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:33.275 [debug] [viewProviders.resources.ConnectionRow.vscode-confluent-cloud-connection] No CCloud auth session, skipping organization refresh; setting values to undefined.
2026-01-28 14:55:33.276 [debug] [FlinkStatementManager] CCloud disconnected, stopping poller
2026-01-28 14:55:33.276 [info] [flinkSql.languageClient.FlinkLanguageClientManager] CCloud auth session ended, stopping Flink language client
2026-01-28 14:55:33.276 [debug] [codelens.flinkSqlProvider] ccloudConnectedHandler called, updating codelenses {"connected":false}
2026-01-28 14:55:33.276 [debug] [viewProviders.resources] Connection row for refreshed, signaling row repaint. {"connectionId":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:33.278 [debug] [viewProviders.resources] Refreshing connection {"connectionId":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:33.278 [debug] [viewProviders.resources.ConnectionRow.vscode-confluent-cloud-connection] No CCloud auth session, skipping organization refresh; setting values to undefined.
2026-01-28 14:55:33.279 [debug] [FlinkStatementManager] CCloud disconnected, stopping poller
2026-01-28 14:55:33.279 [info] [flinkSql.languageClient.FlinkLanguageClientManager] CCloud auth session ended, stopping Flink language client
2026-01-28 14:55:33.279 [debug] [codelens.flinkSqlProvider] ccloudConnectedHandler called, updating codelenses {"connected":false}
2026-01-28 14:55:33.279 [debug] [viewProviders.resources] Connection row for refreshed, signaling row repaint. {"connectionId":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:33.284 [debug] [authn.ccloudProvider] getSessions()
2026-01-28 14:55:33.301 [debug] [authn.ccloudProvider] getSessions() found connection with unusable state {"state":"NONE"}
2026-01-28 14:55:33.301 [debug] [authn.ccloudProvider] getSessions() local auth state change check {"connectionExists":false,"cachedSessionExists":false,"changedToConnected":false,"changedToDisconnected":false,"sessionSecretExists":false}
2026-01-28 14:55:33.312 [debug] [authn.ccloudProvider] getSessions() no connection found
2026-01-28 14:55:33.313 [debug] [authn.ccloudProvider] No auth session, and no cached _session (for this extension instance) found to remove; not taking any action
2026-01-28 14:55:33.324 [debug] [sidecar.connections.watcher] ConnectionStateWatcher: received CONNECTED event for connection id vscode-confluent-cloud-connection
2026-01-28 14:55:33.324 [debug] [sidecar.connections.statusUtils] connectionEventHandler: ccloud connection update received, passing to handleUpdatedConnection()
2026-01-28 14:55:33.345 [debug] [authn.ccloudStateHandling] received update to CCloud connection {"currentState":"SUCCESS","previousState":"NONE","expiration":"2026-01-29T03:48:49.277Z"}
2026-01-28 14:55:33.356 [debug] [authn.ccloudProvider] storage change detected for key: ccloudState
2026-01-28 14:55:33.357 [debug] [authn.ccloudStateHandling] CCloud connected state transition: NONE -> SUCCESS
```
Then after clicking Reauthenticate (or the other sign-in buttons/actions), everything seems to refresh and indicate a signed-in state without having to go to the browser.
Logs after clicking a sign-in action
```
2026-01-28 14:55:49.580 [debug] [authn.ccloudProvider] getSessions()
2026-01-28 14:55:49.593 [error] [authn.ccloudProvider] getSessions() no session secret found but connection exists
2026-01-28 14:55:49.593 [debug] [authn.ccloudProvider] getSessions() local auth state change check {"connectionExists":true,"cachedSessionExists":false,"changedToConnected":true,"changedToDisconnected":false,"sessionSecretExists":false}
2026-01-28 14:55:49.597 [debug] [authn.ccloudProvider] getSessions() auth state changed, firing ccloudConnected event {"connectionExists":true,"cachedSessionExists":false,"changedToConnected":true,"changedToDisconnected":false,"sessionSecretExists":false}
2026-01-28 14:55:49.597 [debug] [viewProviders.resources] Refreshing connection {"connectionId":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:49.597 [debug] [viewProviders.resources.ConnectionRow.vscode-confluent-cloud-connection] Refreshing {"deepRefresh":true}
2026-01-28 14:55:49.597 [debug] [viewProviders.resources.ConnectionRow.vscode-confluent-cloud-connection] Getting environments {"deepRefresh":true}
2026-01-28 14:55:49.597 [debug] [cachingResourceLoader] Deep refreshing CCLOUD resources.
2026-01-28 14:55:49.597 [debug] [FlinkStatementManager] CCloud connected, resetting poller
2026-01-28 14:55:49.597 [debug] [FlinkStatementManager] Polling is enabled, creating new poller with frequency 10
2026-01-28 14:55:49.598 [debug] [codelens.flinkSqlProvider] ccloudConnectedHandler called, updating codelenses {"connected":true}
2026-01-28 14:55:49.598 [debug] [authn.ccloudProvider] convertToAuthSession() SUCCESS
2026-01-28 14:55:49.598 [debug] [authn.ccloudProvider] getSessions() transitioned from disconnected to connected {"connectionExists":true,"cachedSessionExists":false,"changedToConnected":true,"changedToDisconnected":false,"sessionSecretExists":false}
2026-01-28 14:55:49.598 [debug] [authn.ccloudProvider] handleSessionCreated() {"updateSecret":true}
2026-01-28 14:55:49.605 [debug] [authn.ccloudProvider] storage change detected for key: authSessionExists
2026-01-28 14:55:49.605 [debug] [authn.ccloudProvider] handleSessionSecretChange()
2026-01-28 14:55:49.605 [debug] [authn.ccloudProvider] getSessions() returning session
2026-01-28 14:55:49.611 [debug] [telemetry.events] User event {"event":"Notification Button Clicked","data":{"buttonLabel":"Reauthenticate","notificationType":"info"}}
2026-01-28 14:55:49.613 [debug] [authn.ccloudProvider] getSessions()
2026-01-28 14:55:49.616 [debug] [authn.ccloudProvider] getSessions() local auth state change check {"connectionExists":true,"cachedSessionExists":true,"changedToConnected":false,"changedToDisconnected":false,"sessionSecretExists":true}
2026-01-28 14:55:49.617 [debug] [authn.ccloudProvider] convertToAuthSession() SUCCESS
2026-01-28 14:55:49.617 [debug] [authn.ccloudProvider] getSessions() returning session
2026-01-28 14:55:49.619 [debug] [authn.ccloudProvider] handleSessionCreated() {"updateSecret":false}
2026-01-28 14:55:50.276 [debug] [storage.resourceManager] Stored 1 resources for connection vscode-confluent-cloud-connection in storage key vscode-confluent-cloud-connection-environments
2026-01-28 14:55:50.276 [debug] [storage.resourceManager] Stored 3 resources for connection vscode-confluent-cloud-connection in storage key vscode-confluent-cloud-connection-kafkaClusters
2026-01-28 14:55:50.276 [debug] [storage.resourceManager] Stored 1 resources for connection vscode-confluent-cloud-connection in storage key vscode-confluent-cloud-connection-schemaRegistries
2026-01-28 14:55:50.276 [debug] [storage.resourceManager] Found 1 environments for connection vscode-confluent-cloud-connection
2026-01-28 14:55:50.276 [debug] [viewProviders.resources.ConnectionRow.vscode-confluent-cloud-connection] Loaded updated environments {"environments":1}
2026-01-28 14:55:50.276 [debug] [viewProviders.resources.ConnectionRow.vscode-confluent-cloud-connection] Refreshed cache of environments {"environments":1}
2026-01-28 14:55:50.277 [debug] [viewProviders.resources] Connection row for refreshed, signaling row repaint. {"connectionId":"vscode-confluent-cloud-connection"}
2026-01-28 14:55:50.284 [debug] [viewProviders.resources] Getting children {"element":"CCloudConnectionRow"}
```
https://github.com/user-attachments/assets/762c49f1-08aa-4d4f-bd4c-7b5873cbb023
Contributor guide
Assessment
This issue has not been assessed yet.