The redirect method is used when your app needs to send the merchant to an external URL or perform a full page reload outside the dashboard's SPA context.Usage#
Use this for external links, OAuth flows, or legacy pages.How it Works#
Unlike navigate, which uses React Router, redirect triggers a window.location.assign() at the host level. This will completely unload the current dashboard instance and load the new URL.Smart Navigation Helper#
If you're unsure whether a URL is internal or external, you can use the navTo helper, which automatically chooses between navigate and redirect.Security: Always ensure the target URL is trusted.
Confirmation: If redirecting the user away from an unsaved form, consider using embedded.ui.confirm first to prevent data loss.
Modified at 2026-02-02 10:34:37