Is it possible to make multiple OAuth requests from one app?

Hi Folks,

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.

URL - https://subdomain.freshdesk.com/a/integrations/installed_applications/26000002194/edit

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?

Usecase:

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.

2 Likes

Hi @arshath.h,

I will collect and get you more details about the Shopify app in Freshdesk Marketplace.

Could you answer these questions to understand your requirement a little deeper?

  1. Will there be any change in the OAuth config details for different accounts or only multiple access tokens are expected?
  2. With multiple access tokens, we expect there will be multiple refresh tokens as well. Is that correct?
  3. Do you expect some custom UI to support adding multiple accounts instead of adding accounts only when clicking the Install button during the app installation?
  4. Is there any other alternatives provided by the service that you would like to integrate?
2 Likes

@Raviraj

Please find the inline answers below,

  1. Will there be any change in the OAuth config details for different accounts or only multiple access tokens are expected?

    The user will be providing us with the Client Secret & Client ID for each OAuth requests.

  2. With multiple access tokens, we expect there will be multiple refresh tokens as well. Is that correct?

    Yes, you are correct.

  3. Do you expect some custom UI to support adding multiple accounts instead of adding accounts only when clicking the Install button during the app installation?

    Yes, the custom UI will enable the users to enter different Client Secret & Client ID.

  4. Is there any other alternatives provided by the service that you would like to integrate?

    No.

1 Like

Thanks, @arshath.h for your answers to the questions.

Unfortunately, only one OAuth configuration for an app is supported by the platform. To support multiple OAuth configurations, it has to be a change in many places and it cannot be quickly accommodated.
So, I will convert it as a feedback and pass it to the developer platform team to consider it for the roadmap.

The Shopify app in the Marketplace is not a regular Marketplace app. It’s an integration within the Freshdesk product that can be installed as a plugin from the Marketplace. The same behavior cannot be implemented through the developer platform.

Please consider any other alternative for this integration for now or book a slot on the office hours calendar with the Developer Relations team if you would like to discuss further on the solution.

3 Likes