Skip to content

fix(vscode-web)!: add opt-in persistent browser secret storage - #1259

Merged
Edd88-pixel merged 3 commits into
coder:mainfrom
Edd88-pixel:eddy/vscode-web-secret-storage
Nov 20, 2026
Merged

Edd88-pixel merged 3 commits into
coder:mainfrom
Edd88-pixel:eddy/vscode-web-secret-storage

Conversation

@Edd88-pixel

@Edd88-pixel Edd88-pixel commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The current serve-local launcher leaves browser extension secrets in memory, causing authentication sessions to disappear after reload (#584). The official code serve-web launcher provides encrypted browser storage backed by a persistent server key.

Changes

  • Add use_cli = true while keeping the existing launcher as the default.
  • Reuse the existing settings and extension installation logic, with coder-utils handling installation and startup ordering.
  • Persist the CLI key and cache under the module directory and require an isolated application subdomain.
  • Use platform to select the server archive and pass disable_trust and extensions_dir to the server launched by code serve-web. All three options work together.
  • Add regression tests and a browser probe for secret storage and the built-in GitHub/Microsoft authentication providers. Both sign-in flows were verified with end-to-end (E2E) tests behind Coder, including browser reload and workspace restart.

Type of Change

  • Bug fix
  • Feature/enhancement
  • Documentation

Module Information

Path: registry/coder/modules/vscode-web
New version: v2.0.0
Breaking change: Yes — requires Coder provider 2.13+ in both launch modes and Terraform 1.2+. The default launcher remains unchanged.

Related Issues

Related to #584 and follows the investigation in #627. Persistent browser secrets require explicitly enabling CLI mode.

@Edd88-pixel
Edd88-pixel marked this pull request as ready for review November 16, 2026 15:20
@matifali

matifali commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Reject disable_trust, extensions_dir, and platform overrides in CLI mode because these options are not yet supported by code serve-web.

Can we find a workaround for these? The code CLI, under the hood, does automatic download and runs the same code-server binary. Maybe we can write these to a file that it can automatically read.

@Edd88-pixel

Edd88-pixel commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

@matifali Good catch! I tried and got all three options working together. The module uses platform to pick the right archive, and a small launcher passes disable_trust and extensions_dir through to code-server. Everything worked perfectly .

@Edd88-pixel
Edd88-pixel requested review from matifali and removed request for DevelopmentCats November 20, 2026 09:19
@Edd88-pixel
Edd88-pixel merged commit 5103877 into coder:main Nov 20, 2026
8 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.

2 participants