Merge pull request #122 from CJackHwang/codex/refactor-configuration-to-remove-token-support Treat account tokens as runtime-only; remove token-only account support and always refresh tokens on admin actions#123
Conversation
…lback-zh fix: 修复 Docker 在缺少 BUILD_VERSION 时构建失败
…to-remove-token-support Treat account tokens as runtime-only; remove token-only account support and always refresh tokens on admin actions
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4db2732b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err := json.Unmarshal(content, &cfg); err != nil { | ||
| return Config{}, false, err | ||
| } | ||
| cfg.ClearAccountTokens() |
There was a problem hiding this comment.
Avoid forcing re-login on every restart for file-backed configs
cfg.ClearAccountTokens() on file load means all accounts start with empty tokens, so managed-key requests immediately go through auth.Resolver.Determine → loginAndPersist → Store.UpdateAccountToken. UpdateAccountToken still calls saveLocked(), so in deployments where config.json is readable but not writable, requests now fail with a write error after successful login instead of serving traffic with the previously persisted token. This is a startup regression introduced by stripping tokens at load time without decoupling runtime token updates from disk writes.
Useful? React with 👍 / 👎.
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
📝 补充信息 | Additional Information