Skip to content

Commit

Permalink
Add individual run ids to auto-generated public access token when cal…
Browse files Browse the repository at this point in the history
…ling batchTrigger (#1449)
  • Loading branch information
ericallam authored Nov 1, 2024
1 parent befdcef commit 2528548
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/orange-llamas-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/core": patch
---

Add individual run ids to auto-generated public access token when calling batchTrigger
2 changes: 1 addition & 1 deletion packages/core/src/v3/apiClient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class ApiClient {
secretKey: this.accessToken,
payload: {
...claims,
scopes: [`read:batch:${data.batchId}`],
scopes: [`read:batch:${data.batchId}`].concat(data.runs.map((r) => `read:runs:${r}`)),
},
expirationTime: requestOptions?.publicAccessToken?.expirationTime ?? "1h",
});
Expand Down

0 comments on commit 2528548

Please sign in to comment.