Skip to content

Opening a vscode:// URI that does not set &token erases an existing token #318

Closed
@mafredri

Description

@mafredri

It used to be possible to open a workspace via vscode:// URI and re-use existing credentials by skipping the &token parameter, like this:

open 'vscode://coder.coder-remote/open?agent=dev&folder=%2Fhome%2Fcoder%2Fcoder&owner=mafredri&url=https%3A%2F%2Fdev.coder.com&workspace=w'

(Note: no token param.) Right now, when I run this I see the following error:

image

It also erases the token even if it existed previously:

❯ cat Library/Application\ Support/Code/User/globalStorage/coder.coder-remote/dev.coder.com/session_token
cat: Library/Application Support/Code/User/globalStorage/coder.coder-remote/dev.coder.com/session_token: No such file or directory

On the other hand, if I've logged in and explicitly set the token, there is no issue:

open "vscode://coder.coder-remote/open?agent=dev&folder=%2Fhome%2Fcoder%2Fcoder&owner=mafredri&url=https%3A%2F%2Fdev.coder.com&workspace=w&token=$(<Library/Application\ Support/Code/User/globalStorage/coder.coder-remote/dev.coder.com/session_token)"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions