Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: Setup doesn't always pop-out auth window

未关闭
#49 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript

调研方向

从 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
  1. Run altis-cli config setup
  2. observe nothing happens.
  3. run altis-cli config reset
  4. Run altis-cli config setup again
  5. run an arbitrary command
  6. observe auth pop-out to browser occurs
  7. 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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

humanmade/altis-cli 的其他 Issue

查看 humanmade/altis-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。