When login with multipass url, if we add return_to query parameter then it is not redirect to specific url after succesfully login that mentioned in return_to parameter

Hi there

We’re trying to redirect users back to the previous page after they successfully log in using the Multipass URL.

We set redirect code as per below

let redirectValue = ‘content previous page url before login page’;
let separator = multipassUrl.includes(‘?’) ? ‘&’ : ‘?’;
window.location.href = ${multipassUrl}${separator}return_to=${encodeURIComponent(redirectValue)}

For ex. https://yourstore.com/account/login/multipass/?return_to=/checkout

This works perfectly in our development store, where users are redirected to the correct page after login.

However, in our Shopify Plus production store, users are always redirected to the homepage instead — even though we can confirm that the return_to parameter is correctly added to the Multipass URL.

Has anyone else experienced this behavior?

Is there an official way or workaround to make return_to work with Multipass on Shopify Plus?

Any help would be greatly appreciated.

Hi @devnip

Your code is correct. I think that your Shopify Plus store is likely using the “New customer accounts” system, which is known to ignore the return_to parameter and redirect to the homepage. Your dev store is probably still on “Classic customer accounts,” where your code works as expected.

To fix this, go to Settings > Customer accounts in your Plus admin and switch the login experience from “New customer accounts” back to “Classic customer accounts.” This should make your return_to parameter work immediately.

Hope this helps!

Hi @PieLab

Thank you for your reply

Currently our both store development and production are in classic customer accounts.