Im building a multi tenant application where each client has their own subdomain. For example:
I want to allow clients to integrate our app with their Salesforce installation. I have a developer account which I'm using to learn Salesforce and test everything out, and to integrate with our app I had to create a connected app, which gave me a
client_id after it was created. In the connected app, I also had to define a
redirected_uri which needs to be the same I use when calling the OAuth endpoint (https://login.salesforce.com/services/oauth2/authorize)
My question is: do
clientB need to create a connected app inside their salesforce installation, and use
clientA.myapp.com/salesforce/callback or something in their respective
redirect_uri? In other words, can I avoid having to ask my clients for this extra step?
Sometimes we have the same client using two different accounts in our app. For example,
clientA-app2.myapp.com - Internally, for us they are treated as completely different accounts. But if this client only had one Salesforce installation and created one connected app, if
app1 authenticates and receives an authorisation code, and then
app2 does the same, will the authorisation code granted to
app1 be revoked? How could I avoid this scenario? Would the client need to create 2 connected apps inside their Salesforce installation?
I've been researching how other web apps integrate with Salesforce, and particularly looked at Zapier.
They never asked me to create a connected app and provide the ID. The only asked me to click a button that redirected me to Salesforce, I logged in, and gave Zapier permission to access my stuff. So it would seem like Zapier has their own salesforce installation where they created their connected app, and I just gave this connected app permission to access my stuff.
How can I do something like this? All I have in salesforce is a developer account. Am I supposed to create the connected app in there, and use that to connect with our clients installations?