Skip to content
FIRERUN.

The BaaS & deploy-platform newsroom for builders

Subscribe

Vercel

Vercel Flags SDK Drops FLAGS_SECRET, and a Typo Now Fails Silently

Check how flags read their secret. A missing or misspelled FLAGS_SECRET no longer throws in the Flags SDK, and precompute codes now expire per deployment.

Abstract flat-vector editorial illustration for "Vercel Flags SDK Drops FLAGS_SECRET, and a Typo Now Fails Silently"

Vercel’s Flags SDK no longer needs a FLAGS_SECRET on Vercel. Starting with flags 4.5.0, Vercel signs the toolbar’s override tokens and Flags Explorer requests itself, which removes a shared secret teams had to copy into every project and microfrontend (Vercel changelog, Nov. 24, 2026). The package’s own release notes add a catch: a missing or misspelled secret no longer throws an error.

What Changed

The Nov. 24 changelog, by Vercel’s Luis Meyer, said Flags Explorer, overrides and precompute now work with keys Vercel manages. The SDK encrypts the flag values it sends to the Vercel Toolbar with Vercel’s public key.

Existing projects don’t switch on their own. If FLAGS_SECRET is set as an environment variable, or passed in code, the SDK keeps using it after the upgrade. To move to Vercel-managed keys, Vercel said, remove the variable and any code that passes the secret, then run vercel env pull for local work.

The Silent Fallback

The 4.5.0 entry in the SDK changelog, published to npm Nov. 20, spells out the cost. Before 4.5.0, encryptFlagValues(values, process.env.TYPO) threw because the secret was undefined. Now the call encrypts with Vercel’s public key instead. The changelog calls that fallback “silent”: decryptFlagValues can’t read the result, logs a warning and returns undefined.

Precompute Codes Belong to One Deployment

Without a secret, precompute signs its codes with a key derived from VERCEL_DEPLOYMENT_KEY, which Vercel sets per deployment. The SDK changelog said a code is then valid only inside the deployment that created it. Prebuilt deployments and codes shared across deployments or projects still need FLAGS_SECRET, or the new FLAGS_PRECOMPUTE_SECRET, which covers precompute alone.

The changelog also warns Turborepo teams. VERCEL_DEPLOYMENT_KEY isn’t part of a task’s hash, so a cache hit replays codes from an older deployment. The fix the changelog gives is to add VERCEL_DEPLOYMENT_KEY to the task’s env in turbo.json, or to set FLAGS_PRECOMPUTE_SECRET.

Local development after vercel env pull falls back to a fixed public secret when there is no other one. Anyone can mint a code with it, so the SDK warns once when NODE_ENV isn’t development.

Upgrade Past 4.5.0

Three patches followed in six days. Version 4.5.3, published Nov. 26, makes the SDK recheck the expiration of cached encrypted overrides on every use and ties that cache to the active secret, so override tokens stop working once they expire or the secret rotates. Version 4.5.2, out the same day, raised the next peer dependency to 15.0.0 and said Next.js 14 is out of support.

What to Check

  • Upgrade to flags 4.5.3 for the override-expiry fix, whether or not you drop the secret.
  • Search the codebase for every place a secret is passed in, and check each variable name.
  • Add VERCEL_DEPLOYMENT_KEY to turbo.json task env if precompute runs in a cached Turborepo task.
  • Keep FLAGS_SECRET or FLAGS_PRECOMPUTE_SECRET for prebuilt deployments and cross-deployment codes.
  • Move Next.js 14 apps to 15 first, since 4.5.2 requires it.

The Take

This is Firerun’s read, not Vercel’s.

Dropping a shared secret that had to be synced across projects is a good change, and per-deployment keys shrink what a leaked code can do. But swapping a thrown error for a log line turns a crash into a warning in the logs, which is easy to miss in production. Teams that adopt 4.5 should grep for the secret before they delete it, and treat an empty flag value as a misconfiguration, not a default.

Stay in the loop

Get new articles in your inbox

We'll only email you when a new article drops. Unsubscribe anytime.