---
title: "Two-Factor Authentication (2FA)"
description: "Two-factor authentication (2FA) adds a second verification step to login, such as a TOTP code. Learn the methods, how it works and its security benefits."
url: "https://nodea.io/en/glossary/two-factor-authentication"
lang: "en"
updated: "2026-07-13"
---

# Two-Factor Authentication (2FA)

> Two-factor authentication (2FA) is a login method that requires a second, independent factor in addition to a password to verify the user's identity.

**Two-factor authentication (2FA)** is a login method that requires proving identity with two independent factors instead of a [password](https://nodea.io/en/glossary/password) alone. It usually combines something the user *knows* (a password) with something they *have* (a phone, a hardware key) or something they *are* (a fingerprint). As a result, even a leaked password is not enough to take over an account — the attacker still needs the second factor.

## How 2FA works

After a correct password, the system asks for a second proof of identity. The most common methods are:

- **TOTP codes** — one-time codes generated by an authenticator app under the [TOTP](https://nodea.io/en/glossary/totp) standard, rotating every 30 seconds;
- **SMS codes** — sent to a phone; convenient but the least secure;
- **push notifications** — confirming a login with one tap in an app;
- **hardware security keys and passkeys** — based on WebAuthn and resistant to phishing.

The second factor is verified server-side, which effectively neutralises attacks based on stolen passwords.

## Practical applications

2FA is now standard protection for bank accounts, email, website admin panels and corporate systems. It greatly reduces the impact of [brute-force](https://nodea.io/en/glossary/brute-force-attack) attacks and password database leaks, because a password alone stops being enough. Enabling 2FA is especially important for hosting access, server management panels and privileged administrator accounts, where a compromise has the most serious consequences. When rolling out 2FA, provide backup codes or an alternative recovery method so that losing a phone does not lock a user out for good. Keep in mind that methods vary in strength — SMS codes are weaker than TOTP apps, which in turn are weaker than [phishing](https://nodea.io/en/glossary/phishing)-resistant hardware keys. As a best practice, enable 2FA everywhere it is offered and treat it as a baseline security layer rather than an optional extra.

### Does 2FA protect against phishing?

2FA makes account takeover much harder even after a password is stolen, but classic app codes can be phished in real time on a fake site. The strongest protection comes from hardware keys and passkeys that resist phishing, so use them where possible.

## Related

- [TOTP](https://nodea.io/en/glossary/totp)
- [Password](https://nodea.io/en/glossary/password)
- [Phishing](https://nodea.io/en/glossary/phishing)
- [Brute force](https://nodea.io/en/glossary/brute-force-attack)
- [OAuth](https://nodea.io/en/glossary/oauth)

---

Languages: [pl](https://nodea.pl/pl/slownik-pojec/dwuskladnikowe-uwierzytelnianie.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
