Two-factor authentication adds an extra layer of security by requiring users to provide an additional authentication factor, such as a unique code sent to their mobile device, along with their login credentials