Multipass with Dynamic 'return_to'

Highlighted
New Member
1 0 0

Good morning-

I'm working on a project where we will have multiple links from the "main" site into our Shopify store and each link should land the user in a different section of our site (based on collections, etc).  Is there a way to have a generic URL for Multipass with a custom redirect to the desired page/collection in our store?

Here's the different paths I can envision:

  • Each link in the main site has a separate token with the desired return_to; the downside to this is that each link must be dynamically created when a user logs in to the main site.  This is a big change to our current site.
  • As a user logs in to the main site, a single Multipass URL is created with a custom redirect query parameter and that is used in each URL that links to the our Shopify store
    • https://the-store.myshopify.com/account/login/multipass/same-token?redirect=/collections/cool-shoes
      https://the-store.myshopify.com/account/login/multipass/same-token?redirect=/collections/nice-dresses
  • I build a secondary service (like a NodeJS app with Azure functions) that will accept the Multipass token and a redirect value
    • The NodeJS uses the customerAccessTokenCreateWithMultipass API to create an access token
    • The NodeJS then uses the access token from the previous step and redirects the user to the appropriate place in our store

The 3rd path seems like the most likely, but I am unable to find anything in the documentation about how to use a customer access token to log the user in to the site and direct them to a particular page.

Any suggestions?

 

 

0 Likes