We are currently developing a React application that utilizes the Shopify Storefront API to display information about products. However, we would also like to share information about the current user, such as their email address (if logged in), or their session cookie (if not logged in), as we would like to display a "cart" icon on our React app that contains all of the products from the user's Shopify cart. Is this possible?
Solved! Go to the solution
This is an accepted solution.
If you are utilizing the Storefront API in your app, you can pull user information and session data from this. The Storefront API lets you create an access token when a user logs in. The cart will need to be created by you using the checkout object.
Vix | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution