Using the Trigger.dev SDK from your frontend application.
auth.createPublicToken
function in your backend code:
tasks
is the only write scope available at the moment.
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, and any tags associated with it. You can customize the expiration of the auto-generated tokens by passing a publicTokenOptions
object to the trigger
function:
batchTrigger
function: