@oxyhq/core 3.4.17 → 3.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -700,7 +700,10 @@ class HttpService {
700
700
  const refreshed = await this.refreshAccessToken('preflight');
701
701
  if (refreshed)
702
702
  return `Bearer ${refreshed}`;
703
- // Refresh failed — don't use the expired token (would cause 401 loop)
703
+ if (decoded.exp > currentTime) {
704
+ return `Bearer ${accessToken}`;
705
+ }
706
+ // Refresh failed — don't use an expired token (would cause 401 loop)
704
707
  return null;
705
708
  }
706
709
  return `Bearer ${accessToken}`;