Since the old [Auth0 Forum] is now read-only … this is continuing the research for the following post.
So I was able to get the access_token to the Salesforce API after the following two things:
- Auth0:
- Changing my Auth0 / Clients / Addons / Principal Property to email.
- Download the Auth0 signing certificate.
- Salesforce:
- Go to Setup … on the left hand side under Build / Create / Apps … under Connected Apps … Edit your connected app.
- Under the accordion “API (Enabled OAuth Settings)” make sure to select “User digital Signatures” and upload the Auth0 certificate from above.
- The “Selected 0Auth Scopes” I chose were:
- Access and manage your data (api)
- Full access (full)
- Perform requests on your behalf at any time (refresh_token, offline_access)
I also have the NodeJS request.post I ran … I tried to format it properly in this post, but I am having a hard time, so I have it attached here. You will have to modify the code with your app settings.
Additional Question
To get the Salesforce API add-on to work in Auth0 I had to copy my Consumer Key assigned by Salesforce to Auth0 / Addon: Salesforce API. Technically a one to one relationship. This is fine during my development process, but I am looking to have an app that can be used by many different organizations that use Salesforce.
Is there any documentation / examples of this type of scenario?