Multipass token for authenticated Shopify customer

lesliep
New Member
1 0 0

I'm building a headless, statically generated site (Gatsby) that uses the JS Buy SDK and the Storefront API. I have custom register and login forms so that users can create a Shopify customer account. I've been able to successfully register customers, obtain customer access tokens, and associate orders with customer accounts via the Storefront API.

Now I want to transfer my authenticated customer session to the Shopify checkout experience. I understand this is possible using the Multipass feature, but the checkout link from the docs (/account/login/multipass/insert_token_here) seems to require a Multipass token, not a standard customer access token. How do I convert a customer access token to a Multipass token?

I see in the docs I can generate a Multipass token by doing some serverside JSON encoding, but since I already have a valid customer access token, this seems really inefficient. Is there an API query I'm missing to exchange a customer access token for a Multipass token, or some other way of providing the customer access token for the checkout experience?

0 Likes
beauty-by-earth
New Member
2 0 0

He lesli, I am currently facing the same issue, I am logging users in with their customeracess token, but need the accessToken with multipass, did you ever find a workaround for this? We are also using Gatsby and storefront API. Thank you if so!

0 Likes