Authenticate user in checkout webview


I’m building a React Native mobile app for an existing Shopify store that uses New Customer Accounts and the Customer Account API.

Users log into the app successfully using Shopify authentication, and I can fetch their profile and addresses through the Customer Account API without issues.

The problem happens during checkout.

Current flow

  1. User logs into the app (Customer Account OAuth)

  2. User adds items to cart

  3. App creates a Shopify cart via Storefront API

  4. Checkout is opened in a React Native WebView using the checkout URL

When the checkout WebView loads, Shopify treats the user as a guest:

  • it asks them to log in again

  • saved addresses are not loaded

  • checkout session is not linked to the app login

Even though the user is authenticated in the app.

What should I do so that when the checkout page is opened, the user who is logged in remains logged in, and he/she does not have to log in again to fetch the saved address and make a payment

Anybody has solution for the issue I mentioned above??

Hi @Team_Impat

The issue is that opening the checkout URL in a plain React Native WebView creates a completely separate browser session with no knowledge of your app’s authentication.

To fix this, you need to do two things: first, attach your Customer Account API access_token to the cart by passing it as buyerIdentity.customerAccessToken in your Storefront API cartCreate or cartBuyerIdentityUpdate mutation. This produces an authenticated checkoutUrl that already knows who the buyer is.

Second, use Shopify’s official Checkout Kit for React Native (@shopify/checkout-sheet-kit) instead of a raw WebView to present that URL – it handles authenticated handoffs, lifecycle events, and renders in an optimized sheet.

With those two changes, the checkout will load with the buyer already identified, their saved addresses prefilled, and no second login prompt. There is a complete step-by-step guide for this exact flow here: Authenticate checkouts with the Customer Account API. It covers the full OAuth flow, token exchange, attaching the token to the cart, and presenting checkout via Checkout Kit for iOS, Android, and React Native.