Skip to content

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Jan 30, 2026

Summary

  • Logout now clears stored credentials for the current deployment
  • Add "Switch Deployment" command to change deployments without clearing credentials
  • Add "Manage Stored Credentials" command to view and remove stored credentials

Changes

Logout behavior: Previously, logging out only cleared the session but left credentials stored. Now it properly clears all auth data for the deployment.

Switch Deployment: New command for users who work with multiple deployments. Allows switching without losing credentials for other deployments.

Manage Stored Credentials: Replaces the debug-only coder.debug.listDeployments command with a user-facing command that:

  • Shows all stored deployments with $(key) icons
  • Allows removing credentials for individual deployments
  • Includes "Remove All" option (with confirmation) when multiple deployments exist

Fixes #760

…der#760)

- Logout now clears stored credentials via secretsManager.clearAllAuthData()
- Add "Switch Deployment" command to change deployments without clearing credentials
@EhabY EhabY self-assigned this Jan 30, 2026
Replace debug-only coder.debug.listDeployments with user-facing
coder.manageCredentials command. Includes "Remove All" option with
confirmation dialog when multiple deployments are stored.
@EhabY EhabY changed the title Fix logout to clear credentials and add switch deployment command (#760) Improve credential management: clear on logout, add switch and manage commands (#760) Jan 30, 2026
@EhabY EhabY changed the title Improve credential management: clear on logout, add switch and manage commands (#760) Improve credential management: clear on logout, add switch and manage commands Jan 30, 2026
@DanielleMaywood
Copy link
Collaborator

Is it possible to add tests for this?

@EhabY
Copy link
Collaborator Author

EhabY commented Jan 30, 2026

Is it possible to add tests for this?

We do not really have any command.ts tests, I'll create a task for this but it would require a lot of mocking so that's why I opted out here

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

I agree with Danielle's take on testing, we may need to consider mocking vscode.window sooner than later

@EhabY EhabY force-pushed the clear-credentials-on-logout branch from 18a3c44 to 362b397 Compare January 30, 2026 16:25
@EhabY
Copy link
Collaborator Author

EhabY commented Jan 30, 2026

Created #769

@EhabY EhabY merged commit c024db9 into coder:main Jan 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logout doesn't fully clear credentials

4 participants