RealComposer
Frontend / WebPlaidSecurity & Secret Vault

Call Plaid API from Flutter without Exposing Client Secret

Plaid secrets stay out of Frontend / Web bundles

Direct Answer & Architecture Summary

Frontend / Web cannot safely store Plaid production keys. Vault-bound headers reach https://production.plaid.com/accounts/get on Workers while apps call your plaid-api-proxy-flutter edge URL.

Security LevelAES-256-GCM Vault
Edge LatencySub-10ms Response
InfrastructureZero Server Maintenance
The Problem Solved

Why Frontend / Web leaks Plaid credentials

Attackers routinely extract Plaid secrets from Frontend / Web builds. Direct browser calls also expose internal error payloads with hostnames.

Critical Security & Operational Risks:
  • Production Plaid keys copied from Frontend / Web bundles
  • Compliance violations after credential leaks
  • Attackers replaying vault-grade scopes from a laptop
Architecture & Step-by-Step Implementation

How RealComposer Solves This at the Edge

1

Add vault secrets for this pipeline

Add PLAID_SECRET to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.

2

Set headers, mapping, and cache TTL

Use POST against https://production.plaid.com/accounts/get. Allowed origins on the client token should match post pipelines set cache ttl to 0 because realcomposer only stores get responses at the edge. Plaid /accounts/get expects client_id and secret inside the JSON body your app POSTs. Header injection alone cannot authenticate Plaid.

3

Call from Frontend / Web

Call https://realcomposer.com/v1/workspace/plaid-api-proxy-flutter with a restricted rc_live_ client token. Frontend / Web never sends upstream secrets.

                    const res = await fetch('https://realcomposer.com/v1/workspace/plaid-api-proxy-flutter', {
  headers: { Authorization: 'Bearer rc_live_your_token' }
});
                  
Payload Slimming Comparison
78% Bandwidth Reduction
Raw Upstream Response242 B
              {
  "requestId": "req_plaid-ap",
  "upstreamLatencyMs": 142,
  "audit": {
    "region": "edge",
    "trace": "plaid-api-proxy-flutter"
  },
  "payload": {
    "id": "sample_id",
    "status": "active",
    "nested": {
      "tags": [
        "demo"
      ],
      "internal": true
    },
    "unused_blob": {
      "foo": "bar",
      "bar": "baz"
    }
  }
}
            
RealComposer Slimmed Edge Payload54 B
              {
  "accountId": "sample",
  "name": "sample",
  "type": "sample"
}
            

Recipe Specs

HTTP method
POST
Upstream calls
1
Edge cache TTL
No caching
Client auth
Restricted client token
Mapped output fields
3
Payload
242 B to 54 B (-78%)
Call from Terminal or Client
curl -X POST "https://realcomposer.com/v1/workspace/plaid-api-proxy-flutter" \
  -H "Authorization: Bearer rc_live_client_token" \
  -H "Content-Type: application/json" \
  -d '{"model":"example"}'
Frequently Asked Questions

Developer Questions & Troubleshooting

What should Frontend / Web store instead of Plaid secrets?

Use scoped tokens where the vendor allows them on plaid-api-proxy-flutter. Admin keys stay {{secrets.*}} references only.

How do I forward JSON bodies to POST upstreams?

Cache key for plaid-api-proxy-flutter: internal edge-cache path plus sorted query. Identical params hit; vary userId per user.

What happens if an upstream step times out?

Rotate vault secrets for plaid-api-proxy-flutter anytime; clients keep the same rc_live_ token.

Sources & Definitions Used in This Answer

Instant Deployment

Deploy this Frontend / Web + Plaid Recipe

Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.

CLONE THIS RECIPE
Related Architecture Recipes