Skip to content
Dashboard

Trusted Sources for Deployment Protection

, Marc Greenstock,

Link to headingAuthorize Vercel projects

function.ts
import { getVercelOidcToken } from '@vercel/oidc';
await fetch('https://protected-project.vercel.app/api/data', {
headers: { 'x-vercel-trusted-oidc-idp-token': await getVercelOidcToken() },
});

Vercel Function example

Link to headingAuthorize external services

workflow.yaml
- uses: actions/github-script@v7
id: token
with:
script: |
const token = await core.getIDToken();
core.setSecret(token);
core.setOutput('token', token);
- run: |
curl -sSf https://protected-project.vercel.app/api/data \
-H "x-vercel-trusted-oidc-idp-token: ${{ steps.token.outputs.token }}"

GitHub Action example