feat: relay the caller's own keyless signup link from the API - #467
Conversation
Keyless recovery messages linked to a fixed /signin?utm_source=keyless&utm_medium=mcp URL. The API now issues each keyless identity an opaque https://firecrawl.dev/k/<id> link per surface, which the site resolves to MCP keyless attribution and which lets a signup be joined to the keyless identity. The server relays that link instead of the constant: - a keyless 429 from the API: its signup_url - an eligibility refusal: signupUrl from /v2/keyless/eligibility - an account-only tool on a hosted keyless session: the server asks /v2/keyless/eligibility?signup_link=1 for the caller's link Only firecrawl.dev/k links are relayed; anything else, or no link, falls back to https://firecrawl.dev/k, which the site still tags as keyless. Recovery payloads carry the link as signup_url. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
The invalid-link test only exercised the core 429 path. Loop it over the eligibility path too, so a regression in reading or validating signupUrl falls back to the bare /k link instead of relaying an untrusted URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
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.
Auto-approved: Per-caller keyless signup links are now relayed from the API into recovery messages, with strict URL validation and a fallback to the bare /k link; the change is bounded to message/payload formatting and covered by new tests.
Re-trigger cubic
The API now sends the regular keyless signup link (signin?utm_source=keyless&utm_medium=<surface>) when it can't give a /k link. Accept and relay it, and use the regular MCP signup link instead of the bare /k when there is no API link at all, so the MCP surface is still attributed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Dismissed because Cubic found issues in a newer review.
The API now issues stateless 12-character tokens (firecrawl.dev/k/<token>) instead of 8-character database ids, so the trusted-link pattern accepts /k/<12 chars> on either host and no longer accepts the old ids. The regular keyless signin link is still relayed, now on the bare host too, and the regular MCP signin link stays the fallback. Adds coverage for the account-only tool path: a regular link from the signup_link=1 check is relayed, and an untrusted or legacy one falls back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Replace the literal regex with a parsed check: https on firecrawl.dev or www.firecrawl.dev, either /k/<12-char token> with no query, or /signin with exactly utm_source=keyless, utm_medium=api|mcp|cli and an optional redirect=/app/api-keys, in any order and percent-encoding case. Firecrawl-hosted links that fail are logged once each, so an API format change is visible instead of silently falling back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 4 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Per-caller keyless signup links from the API are relayed in recovery messages only after strict URL validation, with fallback to the standard MCP signin link; the change is confined to recovery formatting and covered by tests.
Re-trigger cubic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: Keyless recovery messages now relay a caller-specific, API-issued signup link only after strict field-by-field URL validation, falling back to the standard MCP signin link otherwise; the behavior is confined to recovery messaging and covered by focused tests.
Re-trigger cubic
Keyless recovery messages now relay the caller's own
https://firecrawl.dev/k/<token>signup link from the API, in place of the fixedutm_medium=mcplink. The token is a 12-character encrypted value (keyless IPv4, surface, prompt reason) that the site decrypts to keyless attribution; the API stores nothing per identity.signup_url. An eligibility refusal usessignupUrl./v2/keyless/eligibility?signup_link=1for the caller's link. The API tags that token with theaccount_only_toolreason, and issuing it is free (no rows), so this call stays.firecrawl.dev/k/<12-char token>, or the regular keyless signin link the API sends when it has no token (signin?utm_source=keyless&utm_medium=<surface>), onwww.or the bare host. Anything else (another host, the old 8-character ids, or no link) falls back to the regular MCP signin link (signin?utm_source=keyless&utm_medium=mcp&redirect=%2Fapp%2Fapi-keys), so MCP attribution is kept.signup_url.Safe to deploy before the API change, since it falls back to the regular MCP signin link.
Summary by cubic
Keyless recovery messages now relay the caller's own
https://firecrawl.dev/k/<token>signup link from the API instead of the fixedutm_medium=mcplink, keeping attribution on the identity that was rate-limited.firecrawl.devlinks are rejected.signup_url; an eligibility refusal usessignupUrl; an account-only tool on a hosted keyless session asks/v2/keyless/eligibility?signup_link=1for the caller's link.firecrawl.dev/www.firecrawl.dev, either/k/<12-char token>with no query, or/signinwithutm_source=keyless,utm_medium=api|mcp|cli, and an optionalredirect=/app/api-keys. Anything else falls back to the regular MCP signup link and unrecognized Firecrawl-hosted links are logged once for drift visibility.signup_url, and the server ships as 3.27.0.Safe to deploy before the API change, since it falls back to the regular MCP signup link.
Migration
Ship in order: web
/kroute and signup decrypt, API issuing links, MCP relay, then CLI. SetKEYLESS_SIGNUP_LINK_KEYSin the web env before the API ships.Written for commit 583a554. Summary will update on new commits.
Rollout order (ship in this order)
/k/<token>route and signup decrypt (must be live before the API ships, or new links 404)Web and API must share
KEYLESS_SIGNUP_LINK_KEYSbefore the API ships. Set the same value in the web env first, then in the API env. If the API encrypts with a key the web doesn't have, signups keep the raw token inkeyless_refbut get no decoded columns.馃 Generated with Claude Code