Cannot login with a registered account

Hey all,

I have a mobile app and I am using Storefront API.

I have an account on my shopify store and when I try to login I get this error :

[{“code”: “UNIDENTIFIED_CUSTOMER”, “field”: null, “message”: “Unidentified customer”}]

When I try to register with this account I get this error:

[{“code”: “TAKEN”, “field”: [“input”, “email”], “message”: “Email has already been taken”}]

Any idea how to fix this or why this is happening?

The API returns same error: [{“code”: “UNIDENTIFIED_CUSTOMER”, “field”: null, “message”: “Unidentified customer”}]

for both situations which are wrong password or not registered user.
When I reset my password I am able login.

1 Like

$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => ‘https://shop.myshopify.com/api/2022-01/graphql.json’,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => ‘’,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => ‘POST’,
CURLOPT_POSTFIELDS =>‘{“query”:“mutation SignInWithEmailAndPassword(\n
$email: String!, \n $password: String!,\n) {\n
customerAccessTokenCreate(input: { \n email: $email, \n password:
$password,\n }) {\n customerAccessToken {\n accessToken\n expiresAt\n }
\n customerUserErrors {\n code\n message\n }\n }\
n}”,“variables”:{“email”:"’.$email.‘“,“password”:”’.$password.‘"}}’,
CURLOPT_HTTPHEADER => array(
‘X-Shopify-Storefront-Access-Token: bvfgrt002fed8bece9ba6588e0a784’,
‘Content-Type: application/json’,
‘Cookie: cart_sig=ea4ee2a83f3712d2f1c6614d1cad5c89; secure_customer_sig=’
),
));

return $get_response = curl_exec($curl);
curl_close($curl);

I tried to change my password, but error is still the same.

I logged in into store with my email(test@gmail.com) & have created customer in my store with the same email(test@gmail.com)).

I need to get customer information via GraphQL, but it requires customerAccessToken.

So, I have to generate my customerAccessToken via mutation customerAccessTokenCreate.
While I’m trying to get access token with mutation customerAccessTokenCreate providing my email+password, I got this error

Please, help to solve this