Two-factor authentication (2FA) is an extra layer of security used when logging into websites or apps.