mirror of
https://github.com/larksuite/cli.git
synced 2026-07-03 14:02:43 +08:00
`lark-cli auth login --scope "a,b"` previously sent the raw comma-joined string to the device authorization endpoint, which treats it as a single malformed scope and fails with: device authorization failed: The provided scope list contains invalid or malformed scopes. OAuth 2.0 (RFC 6749 §3.3) requires space-delimited scopes on the wire, but commas are the more natural separator for users typing on a shell (quoting whitespace is awkward, especially for AI-agent generated commands). Accept both: split on commas/whitespace, trim, dedupe, then re-join with single spaces. Also adds unit tests covering single, comma, space, mixed, dedupe, and trailing-separator inputs. Co-authored-by: aj <2072584+meijing0114@users.noreply.github.com>