Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mafredri opened this issue Jul 11, 2024 · 0 comments
Closed
Assignees

Comments

@mafredri
Copy link
Member

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)"
@coder-labeler coder-labeler bot added the bug label Jul 11, 2024
@code-asher code-asher self-assigned this Jul 11, 2024
@matifali matifali removed the bug label Oct 15, 2024
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

No branches or pull requests

3 participants