Skip to content

新增grok切号,自动同步opencode鉴权信息的选项 - #2002

Open
FB208 wants to merge 2 commits into
jlcodes99:mainfrom
FB208:main
Open

新增grok切号,自动同步opencode鉴权信息的选项#2002
FB208 wants to merge 2 commits into
jlcodes99:mainfrom
FB208:main

Conversation

@FB208

@FB208 FB208 commented Aug 20, 2026

Copy link
Copy Markdown

代码已人工reivew,i18n是AI自动翻译的。

新增grok切号同步opencode鉴权,结果如图,已人工测试通过。
image

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

Copy link
Copy Markdown

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: 0556fda9d1

ℹ️ 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".

Comment on lines +155 to +159
Ok(json!({
"type": "oauth",
"access": access,
"refresh": refresh,
"expires": grok_expires_ms(account),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconcile rotated xAI refresh tokens

When OAuth syncing is enabled, this copies the same rotating refresh-token chain into OpenCode, but Cockpit's refresh recovery only adopts credentials from its store, managed Grok home, and official Grok home (grok_account.rs::refresh_credentials), never from OpenCode. Once either OpenCode or Cockpit refreshes an expired token, the other retains the invalidated refresh token; a later Grok switch can even overwrite OpenCode's newer credentials with that stale chain, causing invalid_grant/401 failures. Include OpenCode auth in the guarded credential reconciliation or propagate rotations in both directions before sharing this refresh token.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

该问题在预期内,codex过于严谨

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.

1 participant