I am building a widget to allow the Login form to display on a CMS page. I am able to get the form to display, but when I try to login, I am redirected to the customer/account page and get the error "invalid Captcha". Captcha is turned on and works just fine on the customer/account page.
/app/code/Vendor/Module/Block/Widget/Login.php
namespace Vendor\Module\Block\Widget;
use Magento\Framework\View\Element\Template;
use Magento\Widget\Block\BlockInterface;
class Login extends Template implements BlockInterface
{
protected $_template = "widget/login.phtml";
}
/app/code/Vendor/Module/view/frontend/templates/widget/login.phtml
<?php
echo $this->getLayout()->createBlock("Magento\Customer\Block\Form\Login")->setTemplate("Magento_Customer::form/login.phtml")->toHtml();
Form on CMS Page: