RealComposer
Client PlatformsOfficial WeWeb docs

WeWeb Safe & Unsafe Practices

Direct Answer

WeWeb publishes a front-end app, so collection settings, workflow actions, and variables reach the browser. The optional WeWeb server proxy solves CORS, not secret storage. Keep upstream keys behind a backend or edge proxy and send only user or client tokens from WeWeb.

Credentials & Where They Belong

Client safe
Headers in collections and workflows

Part of the published app. Treat as public.

Client safe
User auth tokens

Issued per user by your auth plugin and short-lived.

Server only
Upstream API secrets

Belong in a backend or edge vault, never in the editor.

Safe Practices

  • Send user tokens, not vendor keys

    Pass the logged-in user token to your proxy and let it decide which upstream calls are allowed.

  • Fetch collections from one composed endpoint

    A single aggregated call per page avoids waterfalls of collection fetches on load.

Unsafe Practices

  • Pasting Stripe or OpenAI secret keys into REST API actions

    The values are published with the app and readable in DevTools.

  • Relying on the CORS proxy to hide credentials

    Proxying a request only changes where it is sent from. Headers defined in the app are still public.

The RealComposer Pattern

Point WeWeb collections and workflows at RealComposer edge URLs with allowed origins set to your WeWeb domains. The pipeline injects vault secrets and returns only the fields your bindings use.

START BUILDING FREE

Frequently Asked Questions

Q:Is it safe to put an API key in a WeWeb REST collection?

Only publishable keys. Secret keys belong behind a proxy because collection configuration ships to the browser.

Security & Secret Vault

Call OpenAI API from WeWeb Securely

An OpenAI key pasted into a WeWeb REST action is published with the app and readable in DevTools. Send WeWeb requests to a RealComposer pipeline instead. The edge injects OPENAI_API_KEY from the vault, checks the calling origin, and returns only the assistant message text.

Sub-10ms edgeView Recipe
Platforms & Frameworks

Fix CORS Errors in WeWeb API Requests

WeWeb CORS errors happen when an API does not allow your WeWeb domain as an origin. Rather than adding auth headers to a proxied request in the app, call a RealComposer pipeline. It answers the OPTIONS preflight, returns the correct CORS headers, and attaches upstream credentials at the edge.

Sub-10ms edgeView Recipe
Multi-API Aggregation

WeWeb Call Multiple APIs on Page Load

WeWeb pages that fetch several collections on load wait for each request and expose any keys used. A RealComposer pipeline calls Supabase and Stripe in parallel at the edge, injects both credentials from the vault, and returns one merged JSON object you bind as a single WeWeb collection.

Sub-10ms edgeView Recipe

Related Concepts