RealComposer

Salesforce Safe & Unsafe Practices

Direct Answer

Salesforce connected app consumer secrets, private keys, and OAuth refresh tokens are server-only. Use a dedicated least-privilege integration user with the OAuth JWT bearer flow for server-to-server calls, and expose only the fields each client actually needs.

Credentials & Where They Belong

Client safe
Connected app consumer key

Identifies the app in OAuth flows. Not sufficient alone to call APIs.

Server only
Consumer secret and JWT private key

Mint access tokens for the integration user.

Server only
Access and refresh tokens

Act as the authorized user until revoked.

Safe Practices

  • Create a dedicated integration user

    Assign a minimal permission set limited to the objects and fields the integration reads.

  • Use the JWT bearer flow for server integrations

    Certificate-based tokens avoid storing passwords and can be revoked per connected app.

  • Whitelist fields in SOQL queries

    Select explicit fields instead of returning whole records to clients.

Unsafe Practices

  • Using the username-password flow with an embedded security token

    It stores a real password and bypasses MFA protections.

  • Running integrations as a System Administrator

    A leaked token then grants full org access.

  • Building SOQL from raw user input

    String-concatenated queries allow SOQL injection. Escape or bind values.

The RealComposer Pattern

Store the instance name and access credentials in the vault, call explicit sobject or query endpoints from an edge pipeline, and slim results to the contact or account fields the client renders.

START BUILDING FREE

Frequently Asked Questions

Q:Can a Webflow site call Salesforce directly?

No. Salesforce tokens would be exposed and CORS will usually block the call. Use a server or edge proxy.

Salesforce Recipes

Security & Secret Vault

Call salesforce api from react without exposing access token

Vault-inject OAuth or integration tokens at the edge; React calls one public client token URL. For "call salesforce api from react without exposing access token", store SALESFORCE_ACCESS_TOKEN in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let React hit only https://realcomposer.com/v1/workspace/call-salesforce-api-from-react-securely with an rc_live_ client token.

Sub-10ms edgeView Recipe
Security & Secret Vault

Hide salesforce api credentials in javascript client app

Edge pipeline attaches Bearer tokens so static sites never embed secrets. For "hide salesforce api credentials in javascript client app", store SALESFORCE_ACCESS_TOKEN in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let JavaScript / HTML hit only https://realcomposer.com/v1/workspace/hide-salesforce-credentials-javascript with an rc_live_ client token.

Sub-10ms edgeView Recipe
Multi-API Aggregation

Merge salesforce contacts with hubspot crm one api

Parallel fetch Salesforce Contact and HubSpot CRM contact into one JSON object. For "merge salesforce contacts with hubspot crm one api", store SALESFORCE_ACCESS_TOKEN, HUBSPOT_ACCESS_TOKEN in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/merge-salesforce-with-hubspot-api with an rc_live_ client token.

Sub-10ms edgeView Recipe
Security & Secret Vault

Call salesforce api from bubble io securely

RealComposer mediates Salesforce REST for Bubble workflows. For "call salesforce api from bubble io securely", store SALESFORCE_ACCESS_TOKEN in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let Bubble.io hit only https://realcomposer.com/v1/workspace/call-salesforce-from-bubble-securely with an rc_live_ client token.

Sub-10ms edgeView Recipe
Multi-API Aggregation

Merge salesforce opportunities with stripe mrr data

Salesforce Opportunity and Stripe subscription MRR merged for dashboards. For "merge salesforce opportunities with stripe mrr data", store SALESFORCE_ACCESS_TOKEN, STRIPE_SECRET_KEY in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Opportunity/{{query.opportunityId}} from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/merge-salesforce-opportunities-stripe-mrr with an rc_live_ client token.

Sub-10ms edgeView Recipe

Combine salesforce with plaid financial data

Salesforce household and Plaid balances in one regulated edge response. For "combine salesforce with plaid financial data", store SALESFORCE_ACCESS_TOKEN, PLAID_SECRET in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let Mobile App (iOS & Android) hit only https://realcomposer.com/v1/workspace/combine-salesforce-with-plaid-accounts with an rc_live_ client token. POST upstream calls are not stored in caches.default; clients must send JSON bodies and headers forward unchanged.

Sub-10ms edgeView Recipe

Related Concepts