You can use the url middleware to add a url sent to the app via the query parameter url to a cookie.
Typically you would call req.getUrl() to redirect to the site after the user has been through a specific journey.
You can use the url middleware to add a failUrl sent to the app via the query parameter failUrl to a cookie.
Typically you would call req.getFailUrl() to redirect to the site after the user has failed on a journey.
An example can be seen if you go to the following page, enter a url and the press the submit button:
http://localhost:3000/redirect?url=http://www.success-url.com&failUrl=http://www.fail-url.com
URL middleware functionality
There is work, documentation and examples in a few internal prototypes (iv and 2fa) that offers the following functionality:
Middleware
### url and failUrl query parametersYou can use the url middleware to add a url sent to the app via the query parameter
urlto a cookie.Typically you would call
req.getUrl()to redirect to the site after the user has been through a specific journey.You can use the url middleware to add a failUrl sent to the app via the query parameter
failUrlto a cookie.Typically you would call
req.getFailUrl()to redirect to the site after the user has failed on a journey.An example can be seen if you go to the following page, enter a url and the press the submit button:
Success Redirect example
Failure Redirect example