Authenticates a customer using their email and password. On success, stores the access token and returns the customer data.
Parameters
Returns
Promise<ShopifyCustomer> - The authenticated customer object.
Throws
Error - If credentials are invalid or login fails.
Examples
Basic login
Check if already logged in
Never store passwords. The SDK only sends credentials to Shopify’s secure API and stores only the resulting access token.