Using the Trigger.dev SDK from your frontend application.
auth.createPublicToken function in your backend code:
expirationTime is a string, it will be treated as a time spanexpirationTime is a number, it will be treated as a Unix timestampexpirationTime is a Date, it will be treated as a datehandle received from the trigger function now includes a publicAccessToken field. This token can be used to authenticate requests in your frontend application:
trigger function expire after 15 minutes and have a read scope for that specific run. You can customize the expiration of the auto-generated tokens by passing a publicTokenOptions object to the trigger function:
batchTrigger function: