I create a login popup template, only extending the phtml file and moving the xml block in my popup panel. It works fine, but when the user make some error (e.g. wrong the password) I want to redirect on the home page and open the panel with the error message.
I don't know how to do this, because by default magento redirect the user on customer login page.
Best Answer
I found the solution, I wrote my controller that extend
\Magento\Customer\Controller\Account\LoginPost
this is my controller:Now in my phtml I only need to check with jquery if the url path contain
?error=1
and open the popup.This is my phtml: