Merged
Size
S
Change Breakdown
Docs100%
#3436docs: document auth.withAuth scoped authentication helper

Scoped authentication helper documented

A new documentation section details scoped authentication for API calls across multiple Trigger.dev projects, along with critical warnings about concurrent usage.

Managing API calls across multiple Trigger.dev environments is getting clearer. Official documentation for the auth.withAuth helper has been added to the management authentication guides. This scoped authentication helper temporarily overrides the API client configuration for a specific callback, then restores the previous state.

This setup allows a single process to interact sequentially with multiple projects. Instead of manually mutating global configurations, the temporary token is applied only within the scope of the callback. However, a critical limitation is explicitly documented: the override relies on process-wide globals rather than async context isolation. This means concurrent requests on long-running servers can leak tokens between overlapping scopes. Until a tracked fix lands, usage must remain strictly sequential.

© 2026 · via Gitpulse