I have a scenario where there can be multiple callback URLs - one for each environment. Can you give me the code to set multiple callback urls as per the referrer url.
like if dev.UIAPP.com → callback url should be dev.UIAPP.com/login
sit.UIAPP.com → callback url should be sit.UIAPP.com/login
Should I create a Javascript policy before the VerifyAPI Key Step and use something like
if refererr.url = dev.UIAPP.com
then context.setVariable(“app_redirect_uri”,“callbackURL_value”)
Kindly help as I am not getting any documentation and not sure how to use the JavaScript policy to set it.
Another option is to set multiple Apps each for a environment specific callback url. But I dont htink this is a very optimal design.
Kindly suggest the most optimal solution