I am following these steps https://docs.clover.com/build/oauth-2-0/#1merch_a... and I have got the flow to work. On the first time call to the oauth/authorize url the Clover user will be asked to login, choose their merchant if needs be and then install the app via the App Marketplace. This works and I understand it.
However I am having an issue identifying which merchant ID is associated with our users. We have multiple users on our site and each will have to install the app, and have a unique merchant ID. I need to store the merchant ID as associated with a user, but I cannot see how to get the OAuth flow to pass back some custom data for me, ie our user ID or some other identifier.
In the settings of the Web App the site url is set as http://localhost:53755/clover (for the sandbox version)
When I call the oauth/authorize url
https://sandbox.dev.clover.com/oauth/authorize?cli...I make the redirect_uri = http://localhost:53755/clover/OAuth/[UserId], so that I can know which user on my side is trying to install the app.
This works if the user has already installed the app, the call to the oauth/authorize will then use the custom redirect_uri with the [UserID] value.
However, on first install of the app, I don't see a way for the "Open App" button to use the already specified redirect_uri that is present in the URL.
Any assistance would be appreciated on how I can get the flow to return some custom data that I pass on the initial call to oauth/authorize, and that will be used by the "Open App" button on the App Marketplace webpage. I want to avoid the user having to install the app first, and then come back to my side and re-trigger the OAuth process.
Thanks