Skip to content

fix(auth): persist stable --account alias on QR login - #248

Open
ericcaiwx-star wants to merge 1 commit into
Tencent:mainfrom
ericcaiwx-star:fix/persist-login-account-alias
Open

ericcaiwx-star wants to merge 1 commit into
Tencent:mainfrom
ericcaiwx-star:fix/persist-login-account-alias

Conversation

@ericcaiwx-star

Copy link
Copy Markdown

Summary

  • On QR login, persist credentials under both the stable CLI --account alias and the normalized ilink_bot_id, so multi-account configs resolve without hand-copying JSON files.
  • Stale-userId cleanup keeps the primary + alias credential files.
  • Docs: CHANGELOG (en/zh) + multi-account README notes.

Motivation

openclaw channels login --channel openclaw-weixin --account collin currently only writes normalizeAccountId(ilink_bot_id).json. Operators who bind peers by readable accountId then need a manual cp of the credential file. This PR makes login write both paths.

Upstream

Primary community PR: NewFuture/openclaw-weixin#53

Test plan

  • npx vitest run src/auth/account-store.test.ts (18 pass)
  • Manual: channels login --account <alias> → both <alias>.json and <botHash>.json exist
  • Manual: gateway resolves peer binding by alias without copying files

Notes

  • No version bump (prefer maintainer release process).

Made with Cursor

Multi-account setups bind readable accountIds (leader/jinjin/…) while iLink
only returns hex@im.bot. Write both credential files and keep both during
stale-userId cleanup so alias-based config resolves without hand-copying.

Port of NewFuture/openclaw-weixin#53.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ericcaiwx-star

Copy link
Copy Markdown
Author

Primary community PR: NewFuture/openclaw-weixin#53

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