Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove or disable email input when email is passed in the checkout.create method #966

Open
razanor opened this issue Sep 6, 2023 · 1 comment

Comments

@razanor
Copy link

razanor commented Sep 6, 2023

Feature details

Currently, the email passed to the checkout.create method can be modified on the checkout page. Is it possible to remove or disable that input if an email is already passed?

A bit more context about our use case

We are using the customerAccessTokenCreateWithMultipass to retrieve an accessToken. This mutation also has a side-effect of creating a new customer if they do not exist. With that access token, we use the following query to retrieve customer orders:

query getcustomerOrders($customerAccessToken: String!) {
  customer(customerAccessToken: $customerAccessToken) {
    orders(first:100) {
    ...}
    ...}
...}

Basically, with this approach, we ensure that a signed-in user on our platform has a corresponding unique account in Shopify, and their orders are synced.

We are passing the user's email to the checkout.create method, and technically, that user could change the email in that input field. This action creates a brand new customer in Shopify and attaches their order to that account, resulting in a broken experience.

I understand that there are fields in the checkout that are required and can't be disabled, however I would expect if you passed the required field that your system rely on, it remains immutable.

@TooColline
Copy link

TooColline commented Nov 1, 2023

This is indeed a challenge

Another concern relates to email validation during checkout creation

The SDK performs email validation before creating a checkout. If this validation fails, it prevents users from completing the checkout

While email verification is essential, it may sometimes flag valid emails as invalid. It would be beneficial to have an option to bypass this validation as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants