How to use ajax for customer creation and login?

How to create a new customer using ajax & how to use a shopify customer login using ajax

  1. Your frontend page (containing the AJAX logic) will send a request to a custom backend API endpoint. Within this backend API, you can leverage Shopify’s Admin API to create the customer record.

  2. For Shopify customer login, you may use the Customer Account AP—however, note that the login page is hosted directly by Shopify. As a result, AJAX cannot be used to handle the login process (due to cross-origin restrictions and Shopify’s authentication flow constraints).