[Bug]: Setup doesn't always pop-out auth window
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- authentication, cli
调研方向
从 lib/commands/config/setup.js 开始,跟踪 lib/vantage.js 中的 VantageAPI.authenticate(),以了解浏览器流程何时运行。检查 bin/altis-cli.js,了解调用配置设置时的首次运行向导路径。完成标准是 altis-cli config setup 直接打开浏览器身份验证流程,包括配置重置之后,且不会出现重复的设置提示。
由索引模型根据 Issue 内容生成。
描述
Bug Description
When running altis-cli config setup the pop-out auth doesn't occur. You need to run a command to get the auth to pop-out into a browser.
It's also been reported that running altis-cli config reset first is required, then rerunning altis-cli config setup, again, and finally running an arbitrary command seems to force the auth pop-out to happen.
Steps to Reproduce and Code Sample
- Run
altis-cli config setup - observe nothing happens.
- run
altis-cli config reset - Run
altis-cli config setupagain - run an arbitrary command
- observe auth pop-out to browser occurs
- success
Expected Behaviour
Running altis-cli config setup should force the popout
Additional Info
Claude Findings:
F1. Root cause. lib/commands/config/setup.js never calls the login flow. It only asks "Reset?" when a token already exists, then writes config.json and prints "Saved configuration!". The OAuth browser flow lives in VantageAPI.authenticate() in lib/vantage.js and only runs on the first API request. That is why stack list opened the browser. Same code in the published 1.0.0-beta.1 (which Goh has, hence the "hm-cli" banner) and in unreleased 1.1.0.
F2. The double "Saved configuration!" Goh saw comes from config reset clearing didSetup, so the next altis-cli config setup runs the first-run wizard (which calls the setup handler) and then runs the setup command again.
Fix (2 files, +24/-12)
- setup.js: after saving, if no token is stored, call authenticate(), wait for the callback, then print "Logged in to Altis Dashboard." Also sets didSetup itself.
- bin/altis-cli.js: skip the first-run wizard when the invoked command is config setup, so reset-then-setup runs login once instead of wizard, login, then a "Reset?" prompt.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 2
- 平均合并
- 16 小时 6 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
humanmade/altis-cli 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
to refine
难度 5/5 一周以上 新手友好度 38/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 35/100
查看 humanmade/altis-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
gnosis/gnosis_vpn#661 ·
维护者通常 1 天内回复
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)未关闭triage:bug-verified
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
fix: reject sourceStorage/packagedStorage bucket that differs from the stack default (fail loud)未关闭
难度 2/5 1-3 小时 新手友好度 82/100
Eyevinn/open-videocore#1300 ·
维护者通常 1 天内回复
-
nextjs-tracking
难度 2/5 1-3 小时 新手友好度 67/100
cloudflare/vinext#4390 ·
维护者通常 1 天内回复
-
kind/bug
难度 2/5 1-3 小时 新手友好度 82/100
kubernetes-sigs/headlamp#8175 ·
维护者通常 2 天内回复