mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-09-24 16:05:44 +08:00
Introduce OAuthRefreshAPI as the single entry point for all OAuth token refresh operations (both background TokenRefreshService and inline TokenProvider), eliminating the race condition where two independent refresh paths consume the same one-time-use refresh_token. Key changes: - New OAuthRefreshAPI with distributed lock + DB re-read + double-check - All 4 platform refreshers implement OAuthRefreshExecutor (CacheKey) - TokenRefreshService and TokenProviders share the same lock key - Add errRefreshSkipped sentinel for accurate refresh statistics - 7 new Path A unit tests covering all RefreshIfNeeded branches chore: bump version to 0.1.100.2