OAuth Providers
Logo for salesforceSalesforce
Obtain access tokens to Salesforce accounts with Handshake.

How it works

With your instance deployed, redirect users to:

https://YOUR_HANDSHAKE_INSTANCE_URL/auth/HANDLER_ID/redirect

Where HANDLER_ID is either salesforce or the value passed to the optional id argument of the Salesforce() factory. (See Options below.)

Handshake will take each user through the Salesforce OAuth flow and before sending them back to you, at the URL specified by the callback_uri query parameter.


Options

Modify your app/options.ts file to include the Salesforce() handler like so:

app/options.ts
import { HandshakeOptions, Salesforce } from "handshake";
 
const options: HandshakeOptions = {
  handles: [
    Salesforce({
      clientId: string,
      clientSecret: string,
      scopes: string[],
      issuer?: string,
    }),
  ],
  // ...
};

Read about valid scopes.

Consult the reference to learn about HandshakeOptions.


Troubleshooting

Not getting refresh token

Make sure you have the refresh_token scope in the scopes array. Make sure it's also in the Connected App settings in Salesforce.


Facing an issue not included here? Open an issue on GitHub to get help.