Maintaining user session when using web checkout

davidbfgo
New Member
3 0 0

Hello,

We are currently building a headless site, specifically using Next's e-commerce framework: Next Commerce.

Users can correctly login or register a new account and browse the site with no issues. When proceeding to the checkout page (web checkout), the user's session isn't persisted. As far as I can tell, the only way I could find to solve this is to associate a checkout with a user but that requires either Multipass (Shopify Plus, which isn't an option) or a custom checkout (not an option either since we don't want to build a public app for it).

 

I'm aware that the new announcements around checkouts might make this possible without extra cost but I'd be happy to hear if anyone had any simpler way to do this. I can't imagine this would be very complicated as it seems as a fairly reasonable thing to want in an e-commerce website.

Thanks.

0 Likes
davidbfgo
New Member
3 0 0

Bumping the thread.

I managed to get a bit further with the checkoutCustomerAssociateV2 mutation with the Storefront API. I might be doing something wrong but from what I tested it's next to useless as it only populates the customer email field but does nothing else, not even the address fields by using the customer's default address. The customer still needs to manually login so I don't really see the point of the mutation in this context.

0 Likes
martinfotp
Excursionist
22 4 8

We ran into this limitation about a year or so ago. In short, MultiPass is the solution.

If you don't want to use MultiPass the only current solution that I know of (I am not up-to-date with 2021-07 changes) is to use the Themes Engine for auth and only use your headless site for the anonymous aspects of the site. Depending on how many 3rd party apps you rely on, this might be the best way to go. 

I wrote a little bit about our approach in here:

https://community.shopify.com/c/Storefront-API-SDKs/Storefront-API-authentication-and-the-Web-checko...

0 Likes
davidbfgo
New Member
3 0 0

Thanks for sharing! We want to avoid Multipass because of the Shopify Plus requirement but I'll look into your other suggestion.

0 Likes