All things Shopify and commerce
Hi we are working on a custom storefront using Shopify as our Shop CMS. We connect to Shopify using the Shopify Storefront API.
Because of the Shopify Checkout is well known and developed, we want to make use of it and do not want to implement a custom Frontend ourself.
First of all we use the SF API GraphQL ’checkoutCreate’ mutation, adding lineItems. After that we use the ‘checkoutCustomerAssociateV2’ mutation to add the customerAccessToken to the already created Checkout.
However if we now redirect to the webUrl of the checkout, we are not redirected directly to the checkout, but the Shopify template asks again for a login although we have already provided the checkout with an customerAccessToken.
Is the re anything we can do to avoid the ‘double login’ ?
Thank you very much in advance, Linus & Team
Solved! Go to the solution
This is an accepted solution.
There is a similar question here, but this was from 2019 and the user was building their product with react-native. I understand there are some limitations when using mobile but I'm not sure if this is one of them. But based on the answer there, it's a security thing to make the user login twice.
It seems like the access token from the customer login should be sufficient. Just pass that as a value when the site goes to the shopify checkout.
On another note, I'm using the cart api rather than the checkout api. So if someone comes across this and knows the answer to the original question, could you also answer if using the cart api makes a difference?
This is an accepted solution.
There is a similar question here, but this was from 2019 and the user was building their product with react-native. I understand there are some limitations when using mobile but I'm not sure if this is one of them. But based on the answer there, it's a security thing to make the user login twice.
It seems like the access token from the customer login should be sufficient. Just pass that as a value when the site goes to the shopify checkout.
On another note, I'm using the cart api rather than the checkout api. So if someone comes across this and knows the answer to the original question, could you also answer if using the cart api makes a difference?
In the Settings for the Shop discard that customers have to be logged in for the checkout process.
But be aware that the checkoutCustomerAssociateV2 was successfull, or you may create an anonymous checkout
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025