Storefront API associate customer to cart

Shopify Partner
5 0 5

I am currently building a headless shop using the storefront api. I managed to setup user registration, user login, cart creation, managing line items etc..

On the frontend when I login as a customer I get back a customerUserToken, with it I can manage user informations and add addresses etc.. but when I associate this customerUserToken with the mutation 'CartBuyerIdentityUpdate'

to the cart and going to the WebCheckout page the user is prompted with the option to login again like if the user was not correctly associated with the cart/checkout. The email address is prefilled correctly but the favorite address is not prefilled. 

Why the user is not considered logged in at this stage? Is there a way to achieve this?

Replies 2 (2)

Shopify Partner
2 0 0

I'm having same issue

2 0 0

As per this Storefront API checkout documentationyou can use the Multipass resource to log in customers and redirect them to a web checkout link. This functionality is available for Shopify plus merchants only.