{
  "slug": "firebase-rest-proxy-webflow",
  "title": "Firebase rest api proxy for webflow site",
  "metaDescription": "Firebase rest api proxy for webflow site. Firestore REST reads via edge with service token vault. Keep Firebase keys in RealComposer Vault; Webflow.",
  "headline": "Firestore-backed Webflow dynamic content",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 8,
  "clientPlatform": "Webflow",
  "upstreamServices": [
    "Firebase"
  ],
  "searchIntentQuery": "firebase rest api proxy for webflow site",
  "directAnswerSummary": "Firestore REST reads via edge with service token vault injection. For \"firebase rest api proxy for webflow site\", store FIREBASE_ACCESS_TOKEN in Secret Vault, call https://firestore.googleapis.com/v1/projects/{{query.projectId}}/databases/(default)/documents/{{query.collection}}/{{query.docId}} from a Worker, and let Webflow hit only https://realcomposer.com/v1/workspace/firebase-rest-proxy-webflow with an rc_live_ client token.",
  "problem": {
    "title": "Firebase keys in Webflow network tabs",
    "explanation": "Webflow ships code or scripts to end-user devices. Any Firebase bearer token in those bundles can be copied from DevTools, proxies, or repackaged apps.",
    "risks": [
      "Shared Webflow projects revealing Firebase tokens",
      "Sudden Firebase quota burn from scripted abuse",
      "Inability to rotate keys without redeploying clients"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Add vault secrets for this pipeline",
      "description": "Create FIREBASE_ACCESS_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Point step firebase at https://firestore.googleapis.com/v1/projects/{{query.projectId}}/databases/(default)/documents/{{query.collection}}/{{query.docId}} with GET. Add output mapping fields that mirror the JSON contract your screen already expects. Leave cache TTL at 0 when each response is user-specific (include userId or record id in query params before enabling cache)."
    },
    {
      "stepNumber": 3,
      "title": "Call from Webflow custom code",
      "description": "Call https://realcomposer.com/v1/workspace/firebase-rest-proxy-webflow with a restricted rc_live_ client token. Webflow never sends upstream secrets.",
      "codeSnippet": "fetch('https://realcomposer.com/v1/workspace/firebase-rest-proxy-webflow', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n}).then(r => r.json());"
    }
  ],
  "pipelineConfig": {
    "name": "Firebase rest api proxy for webflow site",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "firebase",
        "upstreamUrlTemplate": "https://firestore.googleapis.com/v1/projects/{{query.projectId}}/databases/(default)/documents/{{query.collection}}/{{query.docId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.FIREBASE_ACCESS_TOKEN}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "docName",
          "sourcePath": "name",
          "type": "string",
          "sourceStep": "firebase"
        },
        {
          "targetPath": "fields",
          "sourcePath": "fields",
          "type": "object",
          "sourceStep": "firebase"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_firebase",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "firebase-rest-proxy-webflow"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "docName": "sample",
    "fields": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/firebase-rest-proxy-webflow\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Which Firebase credential belongs in the vault for this pipeline?",
      "answer": "Store FIREBASE_ACCESS_TOKEN for firebase-rest-proxy-webflow. Webflow never sees decrypted values."
    },
    {
      "question": "Does POST traffic get cached?",
      "answer": "firebase-rest-proxy-webflow vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Upstream steps in firebase-rest-proxy-webflow honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "call-private-api-from-webflow-securely",
    "fix-cors-error-webflow"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/firebase-rest-proxy-webflow",
    "markdown": "https://realcomposer.com/recipes/firebase-rest-proxy-webflow.md",
    "json": "https://realcomposer.com/recipes/firebase-rest-proxy-webflow.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=firebase-rest-proxy-webflow&via=agent"
  }
}