auth login --scope 单独补授权会覆盖已有用户授权,与 lark-shared 文档「scope 会累积」不符
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- cli, documentation
Hướng nghiên cứu
The behaviour is in the auth login --scope path of the CLI, so start from the login command and how it merges the requested scopes with the token already stored. The documented expectation is in skills/lark-shared/references/lark-shared-identity-and-permissions.md around line 65. Reproducing needs a Lark account with a broad grant, so the first useful step is to check whether the stored scope set is replaced rather than merged. Done means either login keeps existing scopes or the doc's 'accumulates' wording is corrected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
环境
- lark-cli 1.0.84(macOS)
- Lark 国际版,企业自建应用,用户身份已用
--domain all授权过(约 200 个 scope)
复现
lark-cli auth status --json --verify:用户身份正常,im:chat.members:read等 scope 都在,+chat-members-list --as user可用。- 某命令报缺
contact:user.employee_id:readonly,按 lark-shared 速查表「指定单个 scope 授权」执行:
lark-cli auth login --scope "contact:user.employee_id:readonly" --no-wait --json,浏览器同意后lark-cli auth login --device-code <code> --json。 - 返回
"granted": ["contact:user.employee_id:readonly", "auth:user.id:read", "offline_access"],"already_granted": []。 - 再看
auth status:scope 只剩这 3 个;+chat-members-list --as user改报missing required scope(s): im:chat.members:read。
期望
skills/lark-shared/references/lark-shared-identity-and-permissions.md 第 65 行写的是:
多次 login 的 scope 会累积(增量授权)。
期望第 2 步之后原有 scope 保留、新增 1 个。实际是整套被替换。
规避
同一次 login 里带上原范围:lark-cli auth login --domain all --scope "<缺的 scope>",授权后恢复为全部 scope(实测 201 个)。
建议
- 若「累积」是预期行为:修 CLI,login 时与已有 token 的 scope 合并;
- 若「替换」是预期行为:改文档,删掉「会累积」,并把速查表和「权限不足处理」里推荐的单独
--scope写法改成带上原范围,提醒用auth status核对。
1.0.85~1.0.98 的发布说明里没看到相关修复;升级到 1.0.98 后,lark-cli skills read lark-shared/references/lark-shared-identity-and-permissions.md 第 65 行仍是「会累积」。覆盖行为本身只在 1.0.84 上观察到,没在 1.0.98 上重复。
- Ngôn ngữ chính
- Go
- Star
- 18.2k
- Fork
- 1.4k
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của larksuite/cli
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
domain/im
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug domain/doc
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
mail: all-ASCII draft bodies are hard-wrapped every 998 bytes, inserting newlines inside words and tagsCó thể đã có người làm @linye157 đã nhận 26 ngày trước. Đang mởdomain/mail
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
auth: a 429 from the Token Endpoint during refresh deletes a still-valid loginCó thể đã có người làm @linye157 đã nhận 26 ngày trước. Đang mởbug domain/auth domain/im
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
larksuite/cli#2869 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của larksuite/cli
Issue tương tự
-
Add Alice&BotĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#1048 ·
-
【文章自荐】本地 LLM 实测:GPU 推理速度与测量条件Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
eryajf/learning-weekly#235 ·
-
test_archive_is_downloaded_after_logout_login doesn't wait for the storage client after loginĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
list_issues and search_issues: inconsistent `fields` allow-lists (`html_url` rejected by list)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
github/github-mcp-server#3960 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày