@@ -274,7 +274,7 @@ func (o *CodexAuth) CreateTokenStorage(bundle *CodexAuthBundle) *CodexTokenStora
274274// RefreshTokensWithRetry refreshes tokens with a built-in retry mechanism.
275275// It attempts to refresh the tokens up to a specified maximum number of retries,
276276// with an exponential backoff strategy to handle transient network errors.
277- func (o * CodexAuth ) RefreshTokensWithRetry (ctx context.Context , refreshToken string , maxRetries int ) (* CodexTokenData , error ) {
277+ func (o * CodexAuth ) RefreshTokensWithRetry (ctx context.Context , refreshToken string , maxRetries int , authID string ) (* CodexTokenData , error ) {
278278 var lastErr error
279279
280280 for attempt := 0 ; attempt < maxRetries ; attempt ++ {
@@ -292,12 +292,12 @@ func (o *CodexAuth) RefreshTokensWithRetry(ctx context.Context, refreshToken str
292292 return tokenData , nil
293293 }
294294 if isNonRetryableRefreshErr (err ) {
295- log .Warnf ("Token refresh attempt %d failed with non-retryable error: %v" , attempt + 1 , err )
295+ log .Warnf ("Token refresh attempt %d for auth %s failed with non-retryable error: %v" , attempt + 1 , authID , err )
296296 return nil , err
297297 }
298298
299299 lastErr = err
300- log .Warnf ("Token refresh attempt %d failed: %v" , attempt + 1 , err )
300+ log .Warnf ("Token refresh attempt %d for auth %s failed: %v" , attempt + 1 , authID , err )
301301 }
302302
303303 return nil , fmt .Errorf ("token refresh failed after %d attempts: %w" , maxRetries , lastErr )
0 commit comments