How to add a custom step to the customer authentication procedure?

Write a plugin to the \Magento\Customer\Api\AccountManagementInterface::authenticate() method:
https://github.com/magento/magento2/blob/8fd3e8/app/code/Magento/Customer/Api/AccountManagementInterface.php#L101-L110

See also: