Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I am having a flutter app for my Shopify store where I can browse through all my products and collections. But when I add any product to cart using Shopify storefront API and create a checkout url using the following API
query checkoutURL($cartId: ID!) {
cart(id: $cartId) {
checkoutUrl
id
}
}
I get a checkout url and when I try to open the url in the webview it prompts a login dialogue box. How can I auto login the user because I have already logged-in user while entering the app. I have also enabled the shopify multipass option. Please suggest me what I am missing.
Solved! Go to the solution
This is an accepted solution.
You can put X-Shopify-Customer-Access-Token into headers in webview with value is your customer access token.
I have the Same Query, anyone from Shopify please suggest the Solution.
This is an accepted solution.
You can put X-Shopify-Customer-Access-Token into headers in webview with value is your customer access token.
Hi,
We've developed a frontend web app using Storefront API.
We can do user registration, login, etc but we cannot create an authenticated checkout.
When user is logged in in our web app, appears not logged in the checkout, but when the order is complete it's associated to the user.
We've tried both "cartCreate" and "checkoutCreate" APIs.
With "cartCreate" API we cannot assign "deliveryAddressPreferences" to the "CartBuyerIdentity".
We tried also with "cartBuyerIdentityUpdate" but it didn't work.
With "checkoutCreate" instead we can send the shipping address to the checkout and when the user arrive to the chekout the address is filled.
With "checkoutCustomerAssociateV2" we associate the user to the checkout object but the user is stil not logged in the checkout page.
Are there any solutions?
X-Shopify-Customer-Access-Token seems to work only withMobile SDKs.
Is it possible to create a logout where the user is logged in, if we login with Storefront API?
Hi,
I've got the exact same issue, did you resolved this by any chance?
Thanks!
Hi Maurice,
no we didn't.
We need to try the new customer account APIs that should help.
We'll see.
@minhduc wrote:You can put X-Shopify-Customer-Access-Token into headers in webview with value is your customer access token.
Hi,
It was working fine this way, but when I upgraded the flutter SDK version, it stopped working only for IOS. It takes me to the login screen. android is working fine. Is the same thing happening? Please let me know if you find a solution.