I recently upgraded my Magento version from 2.4.2 to 2.4.3, The following code is not working properly (Session and Cookies not working) while it's working fine in the previous version:
protected $_customer;
protected $_customerSession;
public function _construct(...
\Magento\Customer\Model\Customer $customer,
\Magento\Customer\Model\Session $customerSession) {
...
$this->_customer = $customer;
$this->_customerSession = $customerSession;
...
}
$customer = $this->_customer->loadByEmail("[email protected]");
$this->_customerSession->setCustomerAsLoggedIn($customer);
When I clicked on "Proceed to checkout" button the login pop again asking for login. While when I'm using login with password then it's working fine.