Skip to content

feat(dingtalk): add QR code scan authorization for setup wizard#10004

Closed
PeterGuy326 wants to merge 2 commits into
NousResearch:mainfrom
PeterGuy326:feat/dingtalk-qr-auth
Closed

feat(dingtalk): add QR code scan authorization for setup wizard#10004
PeterGuy326 wants to merge 2 commits into
NousResearch:mainfrom
PeterGuy326:feat/dingtalk-qr-auth

Conversation

@PeterGuy326

Copy link
Copy Markdown

Summary

  • Adds QR code scan device-flow authorization to DingTalk setup wizard (hermes gateway setup), eliminating manual developer console workflow
  • Users choose between QR scan (recommended) or manual credential entry
  • New hermes_cli/dingtalk_auth.py module implements the 3-step registration flow (init/begin/poll)
  • Added DINGTALK_CLIENT_ID/DINGTALK_CLIENT_SECRET env var auto-detection in gateway/config.py (parity with other platforms)

Test plan

  • QR scan flow: init -> begin -> render QR -> scan with DingTalk -> poll succeeds -> credentials saved to .env
  • Manual input fallback: selecting option [1] behaves identically to the previous flow
  • QR auth failure: network error during init -> prints error, falls back to manual
  • qrcode library missing: auto-installs via uv pip, renders QR successfully
  • Reconfiguration: existing DINGTALK_CLIENT_ID detected -> prompts "Reconfigure?"
  • gateway/config.py env var detection: DINGTALK_CLIENT_ID + DINGTALK_CLIENT_SECRET in env -> platform auto-enabled

🤖 Generated with Claude Code

PeterGuy326 and others added 2 commits April 15, 2026 09:33
Adds device-flow QR scan auth to `hermes gateway setup` for DingTalk,
eliminating manual credential entry. Falls back to manual input gracefully.
Also adds DINGTALK_CLIENT_ID/SECRET env var auto-detection in config.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@teknium1

Copy link
Copy Markdown
Contributor

Closing — this PR ships the same three-step device flow as #8345 (meng93, Apr 12) and #9610 (audanye-sudo, Apr 14 — submitted one day before this one), which has now been merged via salvage PR #11574 (#11574).

The code in this PR is word-for-word identical to #9610 with only cosmetic substitutions (box-drawing characters ────── replaced with ASCII dashes ------, arrows replaced with ->). Primary credit goes to meng93 as the original author.

@teknium1 teknium1 closed this Apr 17, 2026
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.

2 participants