Description
After completing the GitHub Copilot device-code login successfully(the student package), opencode still
prompts to reauthenticate on every new session, even though opencode auth list shows
a credential is stored.
Steps to reproduce
opencode auth login → GitHub Copilot → GitHub.com → complete device code flow
opencode auth list confirms a credential exists
- Close and reopen opencode (or start a new session) → prompted to reauth again
Observation
Contents of ~/.local/share/opencode/auth.json after a fresh login:
{
"github-copilot": {
"type": "oauth",
"access": "gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"refresh": "gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"expires": 0
}
}
Two things stand out that may or may not be related to the reauth prompts:
expires is 0 right after a successful login
access and refresh have identical values
Not sure if this is expected behavior for how Copilot's device flow issues tokens, or a
storage bug — flagging in case it's useful for reproducing the reauth issue.
Environment
- OpenCode version: [
1.18.11]
- OS: Linux(ubuntu 24.04 LTS)
- Shell: fish
-terminal-emulator: alacritty
- Auth: GitHub Copilot, device code flow, GitHub.com
Description
After completing the GitHub Copilot device-code login successfully(the student package), opencode still
prompts to reauthenticate on every new session, even though
opencode auth listshowsa credential is stored.
Steps to reproduce
opencode auth login→ GitHub Copilot → GitHub.com → complete device code flowopencode auth listconfirms a credential existsObservation
Contents of
~/.local/share/opencode/auth.jsonafter a fresh login:{ "github-copilot": { "type": "oauth", "access": "gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "refresh": "gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "expires": 0 } }Two things stand out that may or may not be related to the reauth prompts:
expiresis0right after a successful loginaccessandrefreshhave identical valuesNot sure if this is expected behavior for how Copilot's device flow issues tokens, or a
storage bug — flagging in case it's useful for reproducing the reauth issue.
Environment
1.18.11]-terminal-emulator: alacritty