Repository navigation
Fall back to the OIDC project in getProviderData before activation - #602
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
vincent-derks
approved these changes
Nov 16, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A project has no datafile until Vercel Flags is activated (its first flag is created).
getProviderDatafrom@flags-sdk/vercelfetches the datafile to learn the project ID of OIDC flags, so before activation the fetch returns 404 and the discovery endpoint fails with a 500. Flags Explorer then shows "Missing version information".On Vercel, #595 already fixes this: the origin of OIDC clients names the project from
VERCEL_PROJECT_ID, so the lookup does not run. Locally,vercel env pullwrites onlyVERCEL_OIDC_TOKEN, so the lookup still runs and fails.Change
As a fallback, when both the bundled definitions and the datafile fail, flags that use OIDC (no SDK key) take the project ID from the
project_idclaim ofVERCEL_OIDC_TOKEN. Flags with an SDK key still throw, since the key can belong to another project. The token is not verified, because the ID only labels the origin.Tests
🤖 Generated with Claude Code