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
Solved! Go to Solution.
Another option is to set multiple Apps each for a environment specific callback url. But I dont htink this is a very optimal design.
In my opinion, this is the better option.
For security purposes, and for consistency, this is the design I would prefer.
If you have your CI/CD set up properly, if you are automating deployment of assets in each environment, including automating the construction of developer apps with their attributes in your testing (preprod) environments, then it should be no problem to have a single specific, per-environment callback URL for each app.
Another option is to set multiple Apps each for a environment specific callback url. But I dont htink this is a very optimal design.
In my opinion, this is the better option.
For security purposes, and for consistency, this is the design I would prefer.
If you have your CI/CD set up properly, if you are automating deployment of assets in each environment, including automating the construction of developer apps with their attributes in your testing (preprod) environments, then it should be no problem to have a single specific, per-environment callback URL for each app.