bigcommerce / catalyst

Catalyst for Composable Commerce
https://catalyst-demo.site
MIT License
79 stars 51 forks source link

Customer does not keep authenticated when navigating from Catalyst storefront to Optimized One-Page Checkout #1059

Open Pedro-Silva-MM opened 1 week ago

Pedro-Silva-MM commented 1 week ago

Describe the bug Running a Catalyst application locally, logging in as a customer, adding items to the cart and proceeding to checkout even though the user was authenticated on the storefront the checkout prompts the user to log in.

To Reproduce Steps to reproduce the behavior:

  1. Run a Catalyst application locally
  2. Log in as a customer
  3. Add items to the cart
  4. Go to checkout

Expected behavior The customer should remain authenticated from storefront to checkout.

image image
bookernath commented 1 week ago

Thanks for your report @Pedro-Silva-MM. This is being added very soon with an improvement to the GraphQL Storefront API which will persist the customer session through to the checkout.

In the meantime, if you require this functionality right now, you can look at the approach in this PR which uses the Customer Login API to do so: https://github.com/bigcommerce/catalyst/pull/715

This approach requires a Client Secret from an API account created directly in the BigCommerce Control Panel.

Once we release our new approach, this will become a feature of the GraphQL Storefront API and will not require any additional credentials.

I'll keep this issue open until we release our new feature.

Pedro-Silva-MM commented 1 week ago

Thank you =)