Redirect Customers to a page when they login

I am using the Customer Accounts version (1 time password).

the whole point is me being able to redirect users to a page (/pages/master-class) after logging in.

so here is the scenario:

  1. customer buy a product

  2. customer gets a specific tag

  3. customer will receive an email thank you and to login

  4. a 1 time password is sent to login.

when they add their email and the OTP is sent i dont want them to be redirected to /accounts/orders. instead to the page listed above.

(from https://shopify.com/XXXXXXXXXX/account/orders to https://{store name}/pages/master-class

here is the code i tried to use

{% if customer %} {% endif %}

Hi @growthhacker ,

You have need to update your current URL with the below.

https://{{SHOPURL}}/customer_authentication/login?return_to={{URL to redirect}}

We have implemented the same logic to below URL
https://letsdebugcode.grtrading.in/blogs/shopify-winter-editions-25/shopify-login-redirect-update-shopify-winter-edition-25

You can refer the video below if you are looking to do this in Shopify theme.

Hope this will helps…