1. 15 Mar, 2026 1 commit
    • erio's avatar
      feat: unified OAuth token refresh API with distributed locking · 1fc9dd7b
      erio authored
      Introduce OAuthRefreshAPI as the single entry point for all OAuth token
      refresh operations, eliminating the race condition where background
      refresh and inline refresh could simultaneously use the same
      refresh_token (fixes #1035).
      
      Key changes:
      - Add OAuthRefreshExecutor interface extending TokenRefresher with CacheKey
      - Add OAuthRefreshAPI.RefreshIfNeeded with lock → DB re-read → double-check flow
      - Add ProviderRefreshPolicy / BackgroundRefreshPolicy strategy types
      - Simplify all 4 TokenProviders to delegate to OAuthRefreshAPI
      - Rewrite TokenRefreshService.refreshWithRetry to use unified API path
      - Add MergeCredentials and BuildClaudeAccountCredentials helpers
      - Add 40 unit tests covering all new and modified code paths
      1fc9dd7b
  2. 02 Feb, 2026 1 commit
  3. 23 Jan, 2026 1 commit
    • shaw's avatar
      fix(token-cache): 版本过时时使用最新token而非旧token · dac6bc22
      shaw authored
      上次修复(2665230a)只阻止了写入缓存,但仍返回旧token导致403。
      现在版本过时时直接使用DB中的最新token返回。
      
      - 重构 IsTokenVersionStale 为 CheckTokenVersion,返回最新account
      - 消除重复DB查询,复用版本检查时已获取的account
      dac6bc22
  4. 22 Jan, 2026 1 commit
  5. 15 Jan, 2026 2 commits