Skip to content

feat(oauth2): authenticate the Coder CLI with OAuth access tokens #270

@fioan89

Description

@fioan89

We also orchestrate the CLI from the plugin, mainly for SSH config manipulation and as a SSH proxy which today it requires login with the API key.

Plugin to CLI: I know there is an effort to unify Coder Desktop Token storage with the CLI one; maybe we can hook into that. Alternatively, we could consider returning the API key using a CLI sub-command, and if invoked, it would either:
A) Perform an OAuth authorize flow from the CLI and return the token
B) return the still valid API key or
C) Use the refresh token to obtain a new API key and return that one

Then, the extension could connect to the CLI. This is comparable to what OpenAI does with the Codex CLI and the VS Code extension.

(Big caveat: none of this is gospel and can change during the RFC process; those are just options and the current state)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions