Skip to content

feat(keyless): forward a World ID credential on keyless requests - #559

Open
erikengervall wants to merge 2 commits into
mainfrom
capy/forward-a-world-id
Open

erikengervall wants to merge 2 commits into
mainfrom
capy/forward-a-world-id

Conversation

@erikengervall

@erikengervall erikengervall commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What

Keyless requests can carry a World ID credential (fcwid_...) as x-firecrawl-world-id, which firecrawl/firecrawl#4934 uses to count the request against the verified human's own keyless bucket instead of the IP.

  • stdio: FIRECRAWL_WORLD_ID sets it (new worldIdCredential server option).
  • HTTP: the authenticate wrapper copies an x-firecrawl-world-id request header onto the session (SessionData.worldIdCredential), the same way it records the client User-Agent, so embedders that admit keyless sessions forward it. A session value wins over the option.
  • Only keylessPost sends it. Requests with an API key or OAuth token never do.
  • The API ignores the header unless World ID is enabled there, so this changes nothing until then.
  • Version 3.31.0 with a CHANGELOG entry.

Tests

  • tests/server-hooks.test.mjs: a keyless session sends the header from the request, else the option; a keyed session sends neither.
  • Full node --test tests/*.test.mjs (172 passed) and pnpm run lint.

Open in Capy


Summary by cubic

Forwards a World ID credential (fcwid_...) as x-firecrawl-world-id on keyless requests so the API can count them against the verified human's own keyless bucket instead of the IP.

  • stdio servers read FIRECRAWL_WORLD_ID into the new worldIdCredential option; HTTP servers copy the x-firecrawl-world-id request header onto the session, and a session value wins over the option.
  • Only keyless requests send the header — requests with an API key or OAuth token never do, and the API ignores it unless World ID is enabled there.
  • Bumps the version to 3.34.0 with a CHANGELOG entry and tests covering header, option, keyed, and OAuth cases.

Written for commit b46bf29. Summary will update on new commits.

View guided diff Turn on auto-fix

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread server.json
Comment thread gemini-extension.json
Comment thread tests/server-hooks.test.mjs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Adds keyless-only World ID credential forwarding (header or FIRECRAWL_WORLD_ID option) with tests and a version bump; needs human sign-off on the quota/attribution and trust-model effects and on the unverified API-side gating claim.

View guided diff | Turn on auto-fix | Re-trigger cubic

@erikengervall
erikengervall force-pushed the capy/forward-a-world-id branch 10 times, most recently from 5defd65 to 2e0780c Compare October 19, 2026 10:34
@erikengervall
erikengervall force-pushed the capy/forward-a-world-id branch from 2e0780c to b46bf29 Compare October 19, 2026 17:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant