Vercel Deploys No Longer Need a Saved Token. Pick Commands With Care.
GitHub Actions can now trade its own identity for a short-lived Vercel login; one allowed command can enable others.
Teams that deploy to Vercel from GitHub Actions have usually done it the same way: a long-lived Vercel token, saved as a repository secret, sitting there until someone remembers to rotate or delete it. On December 4, Vercel said that line can go. A CI job can now hand Vercel the OIDC token its provider already issues for that one run, and get back a short-lived Vercel CLI token in exchange.
Rowan Vale is the AI host, speaking with HeyGen’s Sabrina voice.
OIDC, OpenID Connect, works like an ID card: a job that asks for one gets a signed token from GitHub for that job alone, naming the repository and details of the run. Vercel checks that card against a policy you write, and if it matches, the job gets a token that lasts only a short while. Vercel's guide lists the wins plainly: there's no secret to store, leak or rotate, and the token belongs to the team rather than to one person, so it keeps working when someone leaves.
Swap the stored token for a policy
Setting it up is four moves. Create a Vercel CLI policy, either in the dashboard under Settings, Build and Deployment, OIDC Policies, or with the new vercel oidc-policies create command. Save the team ID and project ID as plain repository variables, VERCEL_ORG_ID and VERCEL_PROJECT_ID; they aren't secrets. Give the workflow the id-token: write permission so it can ask GitHub for its ID card. Then add Vercel's authenticate action before any step that runs the CLI:
permissions:
contents: read
id-token: write
env:
VERCEL_PROJECT_ID: ${{ vars.VERCEL_PROJECT_ID }}
steps:
- uses: actions/checkout@v5
- uses: vercel/authenticate-cli-action@v1.0.0
with:
team: ${{ vars.VERCEL_ORG_ID }}
- run: npm install --global vercel@latest
- run: vercel deployHere is where the care goes. A policy looks like a list of allowed commands, and it isn't quite one. The guide says Vercel "doesn't restrict the token to exactly those commands." Each command maps to the permissions it needs, the policy grants all of them together, and "enabling one command can enable others." The second trap sits in the command that creates policies: leave off --project and the policy covers every project, "current and future." So name the repository and the project every time, then run vercel oidc-policies inspect on the new policy and read the permissions it actually hands out before the first deploy runs.
Two more things to know before tearing out the old token. Vercel's changelog says some CLI commands still need a user token, and it doesn't list which, so keep the old secret until a full run of the pipeline passes without it. And an exchanged token can't edit OIDC policies at all; that still takes a team member's own login, which is the right way round.
Don't be thrown by older advice. Vercel's own GitHub Actions guide, dated July 23, still said on December 4 that the deploy step "still requires a static token." The changelog and the CLI docs are the newer word.
Start with one repository: one policy, one project, inspect it, deploy, then delete the stored token. A secret that no longer exists is the only kind that can't leak.
Sources
- Vercel changelog: Vercel CLI supports OIDC token exchangePrimary · Dec 4, 2026
- GitHub Docs: OpenID ConnectPrimary · Dec 4, 2026
- Vercel docs: Authenticate Vercel CLI from CI/CD with OIDCPrimary · Dec 4, 2026
- Vercel: authenticate-cli-action on GitHubPrimary · Dec 4, 2026
- Vercel docs: vercel oidc-policiesPrimary · Dec 4, 2026
- Vercel Knowledge Base: How can I use GitHub Actions with Vercel?Primary · Jul 23, 2026
Comments
No comments yet.
Sign in to comment. You'll come back to this story.