Skip to content

fix: use configured apiBaseUrl for QR login#190

Open
jeffkit wants to merge 1 commit into
Tencent:mainfrom
jeffkit:fix/qr-login-respect-api-base-url
Open

fix: use configured apiBaseUrl for QR login#190
jeffkit wants to merge 1 commit into
Tencent:mainfrom
jeffkit:fix/qr-login-respect-api-base-url

Conversation

@jeffkit

@jeffkit jeffkit commented Jun 6, 2026

Copy link
Copy Markdown

Summary

startWeixinLoginWithQr / waitForWeixinLogin accept apiBaseUrl from channel config, but fetchQRCode and initial polling used a hardcoded https://ilinkai.weixin.qq.com.

This prevents pairing through local iLink Hub gateways where clients only configure base_url (e.g. http://127.0.0.1:8765).

Changes

  • src/auth/login-qr.ts: use opts.apiBaseUrl for QR fetch, refresh, and initial status polling
  • Store currentApiBaseUrl on login session at start
  • Fall back to DEFAULT_BASE_URL when empty

IDC redirect handling is unchanged.

Test plan

  • openclaw channels login --channel openclaw-weixin with base_url pointing at iLink Hub shows hub pairing QR (ilinkhub.ai/pair/...)
  • Default Tencent login still works when base_url is unset

Made with Cursor

startWeixinLoginWithQr and waitForWeixinLogin accepted apiBaseUrl
but fetchQRCode/poll still used a hardcoded Tencent endpoint.
Use the channel-configured base URL so OpenClaw can pair through
local iLink Hub gateways.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant