{
  "slug": "linear-api-proxy-react-native",
  "title": "Linear api proxy for react native app",
  "metaDescription": "Linear api proxy for react native app. iOS and Android call one edge URL for Linear issue list. Keep Linear keys in RealComposer Vault; React Native.",
  "headline": "Mobile issue trackers without decompiled secrets",
  "category": "security",
  "categoryLabel": "Security & Secret Vault",
  "urgency": 8,
  "clientPlatform": "React Native",
  "upstreamServices": [
    "Linear"
  ],
  "searchIntentQuery": "linear api proxy for react native app",
  "directAnswerSummary": "iOS and Android call one edge URL for Linear issue lists. For \"linear api proxy for react native app\", store LINEAR_API_KEY in Secret Vault, call https://api.linear.app/graphql from a Worker, and let React Native hit only https://realcomposer.com/v1/workspace/linear-api-proxy-react-native with an rc_live_ client token. POST upstream calls are not stored in caches.default; clients must send JSON bodies and headers forward unchanged.",
  "problem": {
    "title": "Why React Native leaks Linear credentials",
    "explanation": "Attackers routinely extract Linear secrets from React Native builds. Direct browser calls also expose internal error payloads with hostnames.",
    "risks": [
      "Production Linear keys copied from React Native bundles",
      "Compliance violations after credential leaks",
      "Attackers replaying vault-grade scopes from a laptop"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Bind vault keys to the Worker",
      "description": "Store LINEAR_API_KEY in the vault. React Native never embeds the raw secret, only a revocable rc_live_ client token."
    },
    {
      "stepNumber": 2,
      "title": "Configure upstream steps and output mapping",
      "description": "Point step linear at https://api.linear.app/graphql with POST. Add output mapping fields that mirror the JSON contract your screen already expects. POST pipelines set cache TTL to 0 because RealComposer only stores GET responses at the edge."
    },
    {
      "stepNumber": 3,
      "title": "Call from React Native",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/linear-api-proxy-react-native', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Linear api proxy for react native app",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "linear",
        "upstreamUrlTemplate": "https://api.linear.app/graphql",
        "httpMethod": "POST",
        "headersTemplate": {
          "Authorization": "{{secrets.LINEAR_API_KEY}}",
          "Content-Type": "application/json"
        },
        "timeoutMs": 10000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "issueId",
          "sourcePath": "data.issue.id",
          "type": "string",
          "sourceStep": "linear"
        },
        {
          "targetPath": "title",
          "sourcePath": "data.issue.title",
          "type": "string",
          "sourceStep": "linear"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_linear-a",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "linear-api-proxy-react-native"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "issueId": "sample",
    "title": "sample"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/workspace/linear-api-proxy-react-native\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Does React Native need CORS changes after adding RealComposer?",
      "answer": "Store LINEAR_API_KEY for linear-api-proxy-react-native. React Native never sees decrypted values."
    },
    {
      "question": "When does edge caching apply to this recipe?",
      "answer": "linear-api-proxy-react-native forwards client JSON to POST upstreams unchanged; secrets interpolate only in URLs and header templates."
    },
    {
      "question": "What happens if an upstream step times out?",
      "answer": "Allowed origins on the linear-api-proxy-react-native client token restrict which domains may call the edge URL."
    }
  ],
  "relatedRecipeSlugs": [
    "stripe-proxy-react-native",
    "best-api-gateway-react-native"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/linear-api-proxy-react-native",
    "markdown": "https://realcomposer.com/recipes/linear-api-proxy-react-native.md",
    "json": "https://realcomposer.com/recipes/linear-api-proxy-react-native.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=linear-api-proxy-react-native&via=agent"
  }
}