Can we set up multiple Redirect URLs in one app? The reason we wanted to do this is our app has different domains/subdomains in different countries, and it would be super helpful if we can also set up the sandbox to work with different testing environments which each has its own domain.
Hi @hx_developer welcome to the forums!
Unfortunately, at this time there is no way to set up multiple redirect urls for OAuth. I will update this to be a feature request so our PMs can see.
Assuming I understood your requirements, there is a possible work-around.
As part of the original authorization request, you can append state. That state is returned with the authorization code. The state could be used as a discriminator to redirect another domain/subdomain.
I haven’t tried this myself but this should work.
Hi Sjosey, Can you verify if Gary’s suggestion here could work? Can we set up multiple Redirect URLs? - #3 by Gary
You can definitely use the
state parameter to pass some sort of “flag” (or whatever - it’s literally just a string value). On your backend, you could read the parameter, and redirect as needed on your own logic, sure!