InsideDarkWeb.com

Magento 2 Forgot Password page incorrect captcha

In my magento site I have enabled Captcha for Forgot Password form of custom theme, but when I try to reset password with providing correct captcha code in the field, even then it shows “Incorrect Captcha” after refreshing & redirecting to same page.

I’m using magento-2-social-login

No warnings/errors either in the client or server.

Any suggestions please?

enter image description here

Magento Asked by mahmoudismail on November 25, 2021

4 Answers

4 Answers

First, check if you enabled default captcha or not. If it is enabled then Disable that, then it will work.

Answered by Kowsigan Atsayam on November 25, 2021

Here is the whole script. I have added jQuery bind concept to reload captcha when forgot password page is loaded.

Here is the path to add the below script.

/app/design/frontend/NAMESPACE/YOURTHEME/Magento_Customer/templates/form/forgotpassword.phtml

<script>
require(["jquery"], function ($) {
    // Reload captcha when page loaded
    $(window).bind("load", function() {
        // Use setTimeout to trigger captcha reload. 
        $(".action.captcha-reload").trigger("click");
    });
});

Answered by Maniprakash Chinnasamy on November 25, 2021

I've adding custom script that can be reloading the captcha image.

In:

/app/design/frontend/name_space/theme_name/Magento_Customer/templates/form/forgotpassword.phtml

Custom script:

jQuery( "captcha-button-selector" ).trigger( "click" );

Then it's solved my problem.

@Kumar thanks.

Answered by mahmoudismail on November 25, 2021

After every action Magento does refresh captcha session so if any Ajax URL run and you open your forgot password then at that time captcha session will be changed that's why you are getting error. Just click on reload captcha button and then refill again to proceed successfully.

You can add scripts to reload captcha when that from open so you will not get error again.

You can manually trigger reload by this

$('.action.captcha-reload'). trigger ('click');

Answered by Kumar M on November 25, 2021

Add your own answers!

Related Questions

How to Add Html Link Additional Options in Magento 2.3.3

1  Asked on November 30, 2020 by kanchi_1695

 

How to create a Grid View Slider. Magento 2

1  Asked on November 29, 2020 by asad-khan

     

Magento 2 Get all attributes option in phtml

3  Asked on November 29, 2020 by user1799722

   

magento 1.9, export data from grid to csv file

0  Asked on November 29, 2020 by denys-maksiura

     

magento 1.9.2.3 admin login not working

3  Asked on November 28, 2020 by nitesh-kumar-singh

   

Magento 2.3 How to edit existing Order without cancel?

0  Asked on November 28, 2020 by rajesh-stanley

   

Magento bms/erp migration from 1.9.3.2 to 2.3.4

0  Asked on November 18, 2020 by sahil-khanna

 

Magento2 Page jumps to top when click Menu Icon on mobile

1  Asked on November 13, 2020 by jaydip-patel

     

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.