Redirect to a specific page after login using the new passwordless login

Topic summary

The discussion addresses how to redirect customers to a specific page after login when using Shopify’s new passwordless login system.

Initial Problem:
PatrickHeck wanted to redirect users to a custom page after passwordless login, similar to using a GET parameter like ?redirect_to=/overview/.

Early Solutions & Limitations:

  • Initial suggestion involved modifying main-login.liquid with a hidden input field, but this only works for classic (password-based) login.
  • Shopify’s new passwordless login initially offered no customization options, forcing some users back to classic accounts.
  • Multiple users expressed frustration that the default behavior redirects to the orders page rather than the previous page or homepage.

Working Solution:
soulchild37 provided a functional approach using the URL format:

/customer_authentication/login?return_to={{ "/" | url_encode }}

This replaces the default /account/login link in theme files.

Implementation Details:

  • For desktop: Modify the login link in header sections
  • For mobile: Also update snippets/header-drawer.liquid
  • Can redirect to specific pages like /account/orders by changing the return_to parameter
  • A detailed tutorial was shared for official Shopify themes

Remaining Issue:
Users report that popup login buttons from third-party apps (like loyalty programs) still redirect to the order page instead of the previous page, with no solution yet provided.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

Will the new login experience never have abilities for customization?

Meaning… if there is anything in it that’s not working for a certain store solution, is the only option to go back to classic?

I’ve just made the switch myself and am not fully understanding if there are any customization options at all.

Since you started this a few month ago, Patrick, I wonder if you can help me understand this.