Skip to content

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

Merged
CJackHwang merged 5 commits intomainfrom
dev
Mar 21, 2026

Conversation

@CJackHwang
Copy link
Owner

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

📝 补充信息 | Additional Information

jacob-sheng and others added 5 commits March 21, 2026 09:55
@vercel
Copy link

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment Mar 21, 2026 7:35am

@CJackHwang CJackHwang merged commit 696b403 into main Mar 21, 2026
4 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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.DetermineloginAndPersistStore.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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants