Technology1 min read

Evaluate Vercel Flags from another project without sharing SDK keys.

By · Published by Everything Blog

In short

Vercel has launched Project Connections to let applications read flags from other team projects without exposing SDK keys. The integration automatically aligns environments so that production deployments only read production flag values. Developers implement this by configuring an adapter containing the source project ID within the consumer codebase. Setup is managed either through the dashboard interface or using updated command-line tools.

Key points

  • Developers must configure an adapter in consumer code using the source project ID to read…: Developers must configure an adapter in consumer code using the source project ID to read external flags.
  • Access controls can be administered directly through the project Flags dashboard or using…: Access controls can be administered directly through the project Flags dashboard or using the Vercel CLI.
  • The feature is available on all plans but requires Vercel Flags SDK version 1.6.0 or core…: The feature is available on all plans but requires Vercel Flags SDK version 1.6.0 or core library version 1.11.0.

Sources checked by our analysis pipeline: 1

Project Connections let applications evaluate flags defined in another Vercel project within the same team, without managing SDK keys.

Previously, sharing flags between projects required copying a server SDK key into an environment variable and managing it manually. Connected projects authenticate using their deployment’s identity. For local development, vercel env pull

retrieves your project’s OIDC token.

Manage access from the Connections page under your project's Flags section, or with vercel flags connections

in the CLI. Connections grant read-only access across all environments. The consumer deployment determines the flag environment (production deployments evaluate production flags).

In the consumer application, create an adapter with the source project’s ID.

import { flag } from 'flags/next';import { createVercelAdapter } from '@flags-sdk/vercel';

const sharedFlagsAdapter = createVercelAdapter({ projectId: 'prj_source',});

export const newCheckout = flag<boolean>({ key: 'new-checkout', defaultValue: false, adapter: sharedFlagsAdapter(),});

Evaluate a flag defined in the connected source project.

Access can be revoked without redeploying.

Project Connections are available on all plans and require @flags-sdk/vercel

1.6.0

or later, or @vercel/flags-core

1.11.0

or later when using the core library directly. Managing connections from the CLI requires Vercel…

Technology