You are tasked with ensuring customers who log into the site are authorized. By default, this consists of ensuring the customers email and password match the values in the database. On this project, you need to verify additional data in this process.
Keeping in mind upgradeability, how is this done?
A. Create a before plugin for MagentoCustomerApiAccountManagementInterface’s authenticate method
B. Create a mutation of a CustomerInterface object to intercept the username and password
C. Create an event observer for the user_save_after observer
D. Override MagentoCustomerControllerAccountController.php
Answer: A
Magento varify customer information using AccountManagementInterface and authenticate methos is also public method so we can use plugin
$customer = $this->customerAccountManagement->authenticate(
$credentials[‘username’],
$credentials[‘password’]
);
Regarding the answer “Create an event observer for the user_save_after observer” it’s an event not available in Magento “user_save_after” but similar type event available in admin “admin_user_save_after”
Answer: A
Answer: A
is A
login does not trigger save
Id go for A rather than C
Answer is A