You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(oauth): address code review suggestions for token refresh
- Extract containsIgnoreCase to new internal/stringutil package
- Replace custom toLower implementations with strings.ToLower
- Add MaxExpiredTokenAge constant (24h) with documentation
- Add TestRefreshStateSync to ensure health and oauth RefreshState stay in sync
These changes improve code maintainability by:
- Eliminating duplicate containsIgnoreCase implementations
- Using stdlib strings.ToLower instead of custom ASCII-only version
- Making the 24-hour expiry threshold explicit and documented
- Adding a guard test to catch RefreshState constant drift
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments