Skip to content

fix(opencode): resolve console device login URL - #43978

Open
opencode-agent[bot] wants to merge 2 commits into
devfrom
console-device-url
Open

fix(opencode): resolve console device login URL#43978
opencode-agent[bot] wants to merge 2 commits into
devfrom
console-device-url

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve Console-provided device verification URLs with standard URL semantics
  • prevent path-based Console deployments from duplicating /console in authorization URLs
  • preserve relative paths beneath the configured server base
  • reject malformed and non-HTTP(S) verification URLs as typed account service errors

Testing

  • bun test test/account/service.test.ts (18 passed)
  • bun typecheck
  • bun x prettier --check src/account/account.ts test/account/service.test.ts
  • git diff --check

Requested by: @Slickstef11 (Stefan via Slack)

@Enough1122

Copy link
Copy Markdown

AI code review — automated review for reference; please use your judgment.

No blocking issues found.

Nit: packages/opencode/src/account/account.ts:399-405 — because the base is the full server URL (${normalizedServer}/), a root-relative verification_uri_complete such as /device?user_code=… resolves to the origin root (https://host/device) rather than beneath a configured subpath (…/console/device) — standard URL semantics keep only path-relative values under /console. If self-hosted servers behind a subpath emit root-relative paths, users would land on the wrong console page and device login would look broken. Worth documenting the expectation (or normalizing root-relative paths onto the server's path prefix) once real server behavior is confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants