Hello Auth0 community,
Im having few thoughts about Auth0 capabilities with using the Salesforce API and would like your input on this.
Im using Auth0 with Salesforce as an identity provider to a specific Salesforce community through a connected app in Salesforce. My goal is to be able to execute queries using the Salesforce API as the logged in user.
For example: I logged in as user A and would like to get list of all accounts associated with the community I am logged in to(giving that I have necessary authorization inside Salesforce to do so)
I setup the example one page React page application to test this with Salesforce community as an social connection and I am able to login successfully and get some basic user information for example “given_name”, “family_name”, “nicname”, “name”, “picture”, “locale”, “email”, “sub” etc.
My questions are:
The access token that I have access to in the react example(when getAccessTokenSilently gets called), am I able to use that token as an access token to protected API endpoints in Salesforce or is that access token specifically for the Auth0 application?
Am I able to use the auth0-react SDK to execute queries in a similar manner as I am able to do in a open-source SDK called JSForce(see code snip here: https://jsforce.github.io/ )?
Do I have to specifically add the Salesforce API as an API in Auth0 dashboard and if so how is that integrated with the Auth0 Application that I currently have?
Any pointers how to achieve this would be great.