customerLogin
Authenticate a customer with email and password
Arguments
| Argument | Type | Description |
|---|---|---|
email | EmailAddress! | |
password | String! |
Returns
| Field | Type | Description |
|---|---|---|
customer | Customer | Authenticated customer account information |
cartMerge | CartMerge | What signing in did with the session's guest cart. Null when the session had none. |
customerErrors | [CustomerLoginError!] | Error details if authentication failed |
Example
mutation { customerLogin( email: "john.doe@example.com" password: "securePassword123" ) { customer { id email givenName familyName } customerErrors { ... on AuthenticationError { code message } } }}{ "data": { "customerLogin": { "customer": { "id": "id-1", "email": "jane@example.com", "givenName": "Example", "familyName": "Example" }, "customerErrors": [ { "code": "INVALID_CREDENTIALS", "message": "Example" } ] } }}The query is the example the schema documents. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
| @evolve-framework/sfcc | Resolved |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-auth:
CustomerLogin

