commerce
commerce copied to clipboard
Login does not persist to checkout
You can reproduce this on the Vercel demo store by signing up for an account, adding products to your cart, and then clicking through to checkout. Upon landing on the checkout page, it thinks I am a guest - instead of recognizing my user.
Hey all,
I actually managed to solve this myself. I'm not sure why Vercel hasn't done a similar thing with their demo store. And ideally, this workaround wouldn't be necessary (I would rather be able to authenticate the checkout without sharing cookies).
Instead of using the default BigCommerce store URL, I setup a url like checkout.mywebsite.com. And my headless shop is www.mywebsite.com. In my code which creates the SHOP_TOKEN cookie, I updated the cookie to be a TLD cookie (e.g. forced it to create the cookie for mywebsite.com). After doing this, the checkout process was aware of the signed in user.
Thanks,
Chris
Hi @avisra, I am also facing the same issue on the Vercel demo. Could you please provide code snippet on your implementation.
Also since you stated that you are using checkout.mywebsite.com instead of the Bigcommerce store checkout url, does this mean you are using embedded checkout?
Thanks
I think this issue might be linked https://github.com/vercel/commerce/issues/531
Hey there! Thank you for your contribution. We have decided to take Next.js Commerce in a new direction and will be closing out current PRs and issues due to this change. Please see this PR for more details: #966