This reference project reproduces the issue where Realtime returns 401 when using createTriggerPublicToken.
- Make sure your Trigger.dev instance is running (webapp).
- Copy
.env.exampleto.envand fill in your details:
cp .env.example .env- Edit
.envto set yourTRIGGER_SECRET_KEYandTRIGGER_API_URL.
Run the reproduction script:
pnpm run repro- Generates a
triggerPublicTokenforissue-2687-task. - Triggers the task using this token.
- Attempts to connect to the Realtime endpoint for the resulting run using the same token.