Skip to main content
Use a Doppler service account identity to exchange a Trigger.dev OIDC token for a short-lived Doppler API token. Your tasks fetch secrets with no DOPPLER_TOKEN stored anywhere. Service account identities are available on Doppler’s Team and Enterprise plans. Follow the OIDC prerequisites, then go to the OIDC page for your environment and copy the issuer URL and subject.

Configure Doppler

  1. In Doppler, create a service account (or reuse one) and give it read access to the project and config your task needs.
  2. On the service account, add an Identity of type OIDC with a custom discovery URL: Doppler requires both the audience and subject claim rules. Use exact values.
  3. Copy the Identity ID. It’s a configuration value, not a secret.

Fetch secrets in your task

/trigger/read-from-doppler.ts
The exchange returns a short-lived API token and its expires_at. The second request uses Doppler’s download secrets endpoint. Exchange inside run, and exchange again if the run outlives expires_at.

Remove the old credential

Once runs in every deployed environment fetch secrets this way, delete DOPPLER_TOKEN from those environments on the Environment Variables page and revoke the old service token in Doppler. Local Development runs can’t mint OIDC tokens. Use the Doppler CLI or your own token there when ctx.environment.type === "DEVELOPMENT".