I’m not sure if that’ll work for my scenario, I need a dynamic return to. Essentially have a login button on product pages, so need to redirect to whatever product the user was on.
Just tested on my end, stock the URL in the query parameters and on form submission, preventDefault, integrate the return_to input and submit the form, you should be redirected to the URL