Auth0 Home Blog Docs

Setting up Auth0 for Salesforce Authentication

authentication
salesforce
salesforce-api-deleg
salesforce-connectio
sign-up

#1

I’m building a hybrid app using Ionic2 and intend to use Salesforce as the backend. I looked at Auth0 for authentication through Salesforce API. I followed the URL: https://auth0.com/authenticate/ionic2/salesforce-api/

There are few parameters given there that I need help to understand:
const auth0Config = {
// needed for auth0
clientID: ‘YOUR_CLIENT_ID’,

  // needed for auth0cordova
  clientId: 'YOUR_CLIENT_ID',
  domain: 'YOUR_AUTH0_DOMAIN',
  callbackURL: location.href,
  packageIdentifier: 'YOUR_PACKAGE_ID'
};

Can someone please clarify what are “YOUR_CLIENT_ID”, “YOUR_AUTH0_DOMAIN” and “YOUR_PACKAGE_ID”? I assumed “clientID” and “clientid” take the same value. “YOUR_CLIENT_ID” is the consumer key from the Salesforce Connected App “YOUR_AUTH0_DOMAIN” is the domain created inside auth0. e.g. .auth0.com but not sure where to find ‘YOUR_PACKAGE_ID’

Also, the last section says as below. Where should I run the below command to get the Token?

Call the Delegation endpoint from
Auth0 to get a token for Salesforce
API

curl --data \
 "client_id=YOUR_CLIENT_ID&\
 &grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer\
 &refresh_token=\
 &scope=open_id\
 &api_type=salesforce_api"\
 https://YOUR_ACCOUNT.auth0.com/delegation

#2