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.
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.
In plain words
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.
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
- Turn on 2-Step VerificationGoogle Account Help, guide
- What is two-factor authentication for Apple Account?Apple UK (2026), how-to video
- How to: Enable Two-factor AuthenticationEFF Surveillance Self-Defense, guide
- Get verification codes with Google AuthenticatorGoogle Account Help, guide
- Top tips for staying secure onlineUK NCSC, guide
Related terms
Cite this page Encryption Observer, “Two-factor codes”, encryption.observer/terms/two-factor/, checked December 2026.