Currently, it is possible to make only one OAuth request during app installation. But we wanted to achieve multiple OAuth requests during app installation.
The behaviour is implemented in Shopify integration in Freshdesk.
Once the install button is clicked, the OAuth iparams will ask for the Shopify store subdomain.
After entering the subdomain and clicks connect, it will redirect to Shopify for auth.
After successful auth, it will be redirected to the Freshdesk instance. The URL the app gets redirected also different from the normal redirected URL.
After auth, it will give us an option to add another store.
By clicking that we will be able to add multiple Shopify stores to one Freshdesk instance. Adding a store will result in OAuth requests from Freshdesk. So multiple OAuth requests are made from an app.
How do we achieve the same for our use case?
We are building an app that will sync multiple accounts data of the same service to Freshdesk. But to fetch the data from multiple accounts, we have to get the Access token using OAuth for each account.