Sign in with Salesforce
People can now sign in to Apiome with their Salesforce account, and link Salesforce beside any other provider on Linked accounts.
- For administrators. Salesforce is a new entry in System settings → Add Provider. It
needs the Consumer Key and Consumer Secret of a Salesforce External Client App or
Connected App, entered as the Client ID and Client secret.
Sign-in providers lists what to set on
Salesforce's side. The environment variables are
SALESFORCE_CLIENT_IDandSALESFORCE_CLIENT_SECRET. - Issuer (optional). Left empty, people sign in through
https://login.salesforce.com. Set the Issuer —SALESFORCE_ISSUERin.env— to your org's My Domain, such ashttps://acme.my.salesforce.com, to send everyone to that org's own login page, or tohttps://test.salesforce.comfor a sandbox. A trailing slash is ignored. - Callback URL.
<BETTER_AUTH_URL>/api/auth/oauth2/callback/salesforce, entered as the app's Callback URL. - Scopes. The app needs Access the identity URL service (id, profile, email, address, phone) and Access unique user identifiers (openid).
- Email addresses. Salesforce is a Trusted provider: a sign-in joins the account with the same address, or starts a new one, only when Salesforce reports the address as verified. Otherwise, verify the address in Salesforce, or sign in another way first and link Salesforce from Linked accounts.
- REST API.
GET /v1/admin/auth-providerslistssalesforceas an available provider, andPUT /v1/admin/auth-providers/salesforcestores its credentials and, underconfig.SALESFORCE_ISSUER, its issuer.
