Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

# Changelog

## [1.5.4] - 2025-04-25

### Added

- Changed server-side authorized requests to refresh its auth token if it expires
within 1 second.

## [1.5.3] - 2025-04-18

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pipedream/sdk",
"type": "module",
"version": "1.5.3",
"version": "1.5.4",
"description": "Pipedream SDK",
"main": "./dist/server.js",
"module": "./dist/server.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export class BackendClient extends BaseClient {
let attempts = 0;
const maxAttempts = 2;

while (!this.oauthAccessToken || this.oauthAccessToken.expiresAt - Date.now() <= 0) {
while (!this.oauthAccessToken || this.oauthAccessToken.expiresAt - Date.now() < 1000) {
if (attempts > maxAttempts) {
throw new Error("ran out of attempts trying to retrieve oauth access token");
}
Expand Down
6 changes: 2 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading