Redirecting customer to shopify store after logging in customer using Shopify Storefront API

Topic summary

A developer is working with the Shopify Storefront API’s customerAccessTokenCreate mutation to generate access tokens for customers. They want to programmatically log customers into a Shopify store and redirect them to a store page using the generated access token.

Key Question:
Is there a recommended method to authenticate customers and redirect them to the Shopify store URL using their email/password credentials and the access token?

Response Received:
Another user suggests that Shopify Flow may not be suitable for this real-time, user-facing authentication scenario since it operates asynchronously. They recommend exploring a custom app approach instead to better handle the login and redirect functionality.

Status: The discussion remains open with no definitive solution provided yet.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

Using the below link, I’m able to generate an access token for a customer. I want to check if its possible to redirect the customer to a shopify store url by passing the access token to indicate the customer is logged in, programmatically.

(or) is there a recommended way of doing this, where given the customer details i.e., email and password details of their Shopify account, they can be logged in programmatically and redirected to a shopify store page.

https://shopify.dev/docs/api/storefront/2024-04/mutations/customeraccesstokencreate

Hi @ravi_polepeddi because Flow operates asynchronously we’re probably not the right solution for real-time, user-facing operations like logging in a customer and redirecting them. This use case might be better addressed via a custom app