1

After enabling any recaptcha storefront, getting error of recaptcha.

Error :

{
    "errors": [
        {
            "message": "ReCaptcha validation failed, please try again",
            "extensions": {
                "category": "graphql-input"
            },
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": [
                "generateCustomerToken"
            ]
        }
    ],
    "data": {
        "generateCustomerToken": null
    }
}

GraphQL Query :

mutation customerAccessTokenCreate {
  generateCustomerToken(
    email: "[email protected]",
    password: "Test@123"
  ) {
    token
  }
}

Note : After disabling captcha from admin (Admin Panel -> Stores -> Settings -> Configuration -> Security -> Google reCAPTCHA Storefront -> Storefront -> Enable for Customer Login -> No), It's working.

4
  • Hello @Vrajesh, are you passing the Authorisation: Bearer Your_Token in the header area? Also update the configuration using command bin/magento config:set oauth/consumer/enable_integration_as_bearer 1 Jul 26, 2023 at 12:25
  • In Customer Token also I need to pass ? @TarunBhalodia Jul 26, 2023 at 13:24
  • 1
    github.com/magento/magento2/issues/34731 refer this ticket, it is same as your problem Jul 26, 2023 at 14:32
  • 1
    Thank you @TarunBhalodia. I have found the solution from above github post. Jul 27, 2023 at 7:57

1 Answer 1

1

Based on comment I have found the solutions from github (https://github.com/magento/magento2/issues/34731)

So need to pass the Access Token created from Admin Panel.

Steps to create Admin Access Token : Admin Panel -> System -> Extensions -> Integrations -> Add New Integration.

Fill all the required details. (In API tab select Resources Access - Custom Or All) and Click on Save. Once saved need to Activate, so click on Activate Button.

Now Consumer Key, Consumer Secret, Access Token, Access Token Secret are created.

Use Access Token.

Pass that Access Token In Headers : Authorization : Bearer <access_token>

KEY : Authorization VALUE : Bearer <access_token>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.