Here is my case study:
We are developing a mobile app.
The mobile app interacts with two salesforce orgs i.e.
- Metadata org : Having all the customer metadata required by mobile app for each customer.
- Real customer salesforce org: This org is real customer org they use for their CRM or other use.
One way to use both orgs with mobile app is to Oauth with both of them and store the tokens. But that would require us making the customer do OAuth requests two times.
One way I see, is to use Salesforce Auth provider and make user click on the Auth Provider SSO URL(iPhone WebView can be used) to create user in Metadata org. But we don't have a way to again get the auth token for the newly created user.
Whats best way to deal with this, that requires minimal OAuth flows ?