@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.
@@ -697,7 +697,10 @@ export class HttpService {
697
697
  const refreshed = await this.refreshAccessToken('preflight');
698
698
  if (refreshed)
699
699
  return `Bearer ${refreshed}`;
700
- // Refresh failed — don't use the expired token (would cause 401 loop)
700
+ if (decoded.exp > currentTime) {
701
+ return `Bearer ${accessToken}`;
702
+ }
703
+ // Refresh failed — don't use an expired token (would cause 401 loop)
701
704
  return null;
702
705
  }
703
706
  return `Bearer ${accessToken}`;