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

Related Concepts