Skip to content

fix(auth): respect server username in clients#25596

Merged
nexxeln merged 2 commits intodevfrom
nxl/fix-server-auth-username
May 3, 2026
Merged

fix(auth): respect server username in clients#25596
nexxeln merged 2 commits intodevfrom
nxl/fix-server-auth-username

Conversation

@nexxeln
Copy link
Copy Markdown
Member

@nexxeln nexxeln commented May 3, 2026

summary

  • centralize OpenCode server basic auth header creation
  • use configured server usernames for attach, run attach, ACP, TUI worker, and plugin clients
  • add attach --username/-u and coverage for auth header precedence

Closes #25113

testing

  • bun test test/server-auth.test.ts
  • bun typecheck (packages/core)
  • bun typecheck (packages/opencode)
  • bun turbo typecheck

@nexxeln
Copy link
Copy Markdown
Member Author

nexxeln commented May 3, 2026

/review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

lgtm

@nexxeln nexxeln enabled auto-merge (squash) May 3, 2026 13:41
@nexxeln nexxeln disabled auto-merge May 3, 2026 13:41
@nexxeln nexxeln merged commit 8694c5b into dev May 3, 2026
10 checks passed
@nexxeln nexxeln deleted the nxl/fix-server-auth-username branch May 3, 2026 13:58
@OpeOginni
Copy link
Copy Markdown
Contributor

@nexxeln based on this PR, could you take a look at this one #25600, it adds the --username option as well to the run --attach command.

Needed as I added that to the documentation update, a while ago which Aiden merged in, but didn't approve the actual logic PR, but your PR does it better.

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.

Cannot use opencode attach when OPENCODE_SERVER_USERNAME set

2 participants