Authenticate customers through web checkout

I am working on a mobile app that includes a Shopify store and allows customers to login with their Shopify credentials and gets their customer access token and stores it on the device. Later, when customers go to checkout their purchases, the Shopify web checkout page is opened and users have to login again through the website. Is their any way to send the customer access token or some other form of authentication to the web checkout page so that when it opens, the customer is logged in and their information is already filled from their last purchase?

Thank you,

David Corbin

1 Like

I have exactly this same question.

The result of the code below with verified CheckoutID and CustomerAccessToken does not return any errors, yet it also does not associate the customer to the checkout.

This appears to be a common question on the Shopify forums, and I haven’t seen any responses that allude to any resolutions.

mutation {
    checkoutCustomerAssociate(
        checkoutId: "Z2lkOi8vc2hvcGlmeS9DaGVja291dC82ZWQzZWE3YzU1NWExZmY5ZDJjNWMxYjE0MzBlYT...",
        customerAccessToken: "33d12268b5b..."
    ) {
        checkout {
            id
          
        }
    }
}

Hi David(s),

Your question seems related to this recently resolved issue in our mobile buy SDK: https://github.com/Shopify/mobile-buy-sdk-ios/issues/841. Can you confirm whether passing the X-Shopify-Customer-Access-Token header in your request to load the checkout resolved your issue?

Cheers,

Yes, the sending the header now successfully authenticates the customer at checkout. Thank you.

I am still getting the “Already have an account? Log in” link on the page. :frowning:

Can you please guide me how to do this? I am badly stuck into this situation.

1 Like