[PR #172] [CLOSED] fix: invalidate provider state when OAuth tokens are refreshed #9555

Closed
opened 2026-02-16 18:13:45 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/172
Author: @monotykamary
Created: 6/17/2025
Status: Closed

Base: devHead: fix/oauth-token-refresh-sync


📝 Commits (1)

  • 09ee579 fix: invalidate provider state when OAuth tokens are refreshed

📊 Changes

2 files changed (+23 additions, -0 deletions)

View changed files

📝 packages/opencode/src/auth/anthropic.ts (+5 -0)
📝 packages/opencode/src/provider/provider.ts (+18 -0)

📄 Description

Summary

  • Fixes "OAuth token has been revoked" errors when multiple opencode instances are running
  • Invalidates cached provider state when OAuth tokens are refreshed to ensure all instances use fresh tokens

Test plan

  • Test with multiple opencode instances running simultaneously
  • Verify OAuth token refresh works without requiring re-authentication
  • Confirm no regression in single-instance usage

🤖 Generated with opencode


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/172 **Author:** [@monotykamary](https://github.com/monotykamary) **Created:** 6/17/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/oauth-token-refresh-sync` --- ### 📝 Commits (1) - [`09ee579`](https://github.com/anomalyco/opencode/commit/09ee579bef8af565cb582548a4d422be41fd6081) fix: invalidate provider state when OAuth tokens are refreshed ### 📊 Changes **2 files changed** (+23 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/auth/anthropic.ts` (+5 -0) 📝 `packages/opencode/src/provider/provider.ts` (+18 -0) </details> ### 📄 Description ## Summary - Fixes "OAuth token has been revoked" errors when multiple opencode instances are running - Invalidates cached provider state when OAuth tokens are refreshed to ensure all instances use fresh tokens ## Test plan - [ ] Test with multiple opencode instances running simultaneously - [ ] Verify OAuth token refresh works without requiring re-authentication - [ ] Confirm no regression in single-instance usage 🤖 Generated with [opencode](https://opencode.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:45 -05:00
yindo closed this issue 2026-02-16 18:13:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9555