Encryption Observer

Glossary Encryption you use every day

Two-factor codes

Two-factor authentication asks for something you have, such as your phone, as well as your password. Authenticator apps make a new six-digit code every 30 seconds from a secret shared with the website when you set it up.

Think of it like this

A front door that needs both a key and a code that changes every 30 seconds.

Why it matters

It stops most account takeovers that use stolen passwords. Codes sent by text message are weaker, because criminals can sometimes hijack your phone number.

Where you meet it

Google Authenticator, Microsoft Authenticator, the code fields in banking and email logins.

Something you knowyour passwordSomething you haveyour phone or a keyBoth neededSigned inA thief with only yourpassword is stopped here
Signing in needs two different kinds of proof. A stolen password alone is not enough.

More diagrams: Second factors ranked by strength · What happens in a 3-D Secure online checkout

Go deeper history and technical detail

Authenticator apps follow the TOTP standard (RFC 6238, 2011), which feeds the shared secret and the current time into HMAC. Codes can still be phished by a fake site that passes them on in real time. Passkeys and hardware security keys defeat that because they check the website's real address.

Read or watch next

Related terms

Cite this page Encryption Observer, “Two-factor codes”, encryption.observer/terms/two-factor/, checked December 2026.