Repository navigation
Conversation
Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Updates the Flags SDK docs and README so they no longer say a
FLAGS_SECRETis required, matching the SDK changes in #586, #587 and #589.Why
After #586, #587 and #589, an app on Vercel works without a
FLAGS_SECRET.encryptFlagValuesuses the public key of Vercel, the SDK accepts overrides that Vercel signs, and the discovery endpoint accepts tokens that Vercel signs. The docs still tell every project to generate and set a secret, and the SvelteKit examples importFLAGS_SECRETfrom$env/static/private. That import fails the build when the variable isn't defined.Approach
Describe
FLAGS_SECRETas optional on Vercel, and keep it documented where it's still needed:vercel env pullProjects that already have a secret keep working.
Changes
packages/flags/README.md(the rootREADME.mdlinks to it): Setup now leads with the no-secret path, andFLAGS_SECRETgets its own optional section.providers/vercel.mdx: drops the line saying activation creates aFLAGS_SECRETthat overrides depend on, and dropsFLAGS_SECRETfrom the copy prompt.frameworks/sveltekit/index.mdx: the setup step is now justvc env pull, andcreateHandle({ flags })no longer passes a secret.api-reference/frameworks/sveltekit.mdx:createHandle'ssecretis optional, with the no-secret behavior described.api-reference/frameworks/next.mdx:createFlagsDiscoveryEndpointworks without a secret on Vercel.api-reference/core/core.mdx:verifyAccessaccepts Vercel-signed tokens, returnsfalsewithout a secret, and has asecretparam.decryptOverridescan't read Vercel-signed overrides.frameworks/next/precompute.mdxand bothe2e-tests.mdxguides: say the secret is still needed there.Open points for review
FLAGS_SECRETper environment? This PR stops saying it does, but doesn't claim it no longer happens.flagsversion isn't stated. Add it once the release version is known.skills/flags-sdk,skills/vercel-flags, and theexamples/providers/*READMEs and deploy buttons still treatFLAGS_SECRETas required.Validation
These are docs-only changes, checked against the behavior in the #586, #587 and #589 PR descriptions and against
packages/flags/src/sveltekit/{index,env}.tson the #589 branch. I did not build the docs site.Co-authored-by: vercel-v[bot] <353008837+vercel-v[bot]@users.noreply.github.com>