One-time code
A one-time code is a temporary authentication credential intended to be accepted for a single use or during a limited validity period.
Software Security for Developers
A one-time password is an authentication code that is valid for a single use or a limited period.
- How it is used
- Supports passwordless login and multifactor authentication by providing a temporary verification key.
- How deep it goes
- Explains expiration, single use, delivery, risks, and implementation safeguards without descending into cryptographic protocol internals.
- Examples
- Uses six-digit codes delivered by SMS, email, or authenticator apps such as Google Authenticator, Authy, and Microsoft Authenticator.
- What you can do after
- Apply it by choosing safer delivery, expiration, generation, rate-limiting, monitoring, and invalidation practices.
Read how Software Security for Developers explains one-time code →
Architecting Accessibility
A one-time code is a temporary code intended to be used once, commonly as part of an identity-verification process.
- How it is used
- Reduces login transcription by letting supported browsers help enter SMS codes.
- How deep it goes
- Explains autocomplete, origin matching, and SMS limitations, while describing browser assistance as limited.
- Examples
- Uses a six-digit phone-to-laptop login and a BarkBank SMS example.
- What you can do after
- Apply the autocomplete="one-time-code" attribute and use the specified SMS format to enable browser assistance.
Read how Architecting Accessibility explains one-time code →
Real-World Cryptography
A one-time password is an authentication code intended to be accepted for only one authentication attempt or a narrowly defined validity period.
- How it is used
- Enables passwordless user authentication without sending a long-term symmetric key to the service.
- How deep it goes
- Explains symmetric-key derivation, HOTP counters, TOTP time values, registration, generation, and constant-time validation.
- Examples
- Uses Google Authenticator, six-digit 30-second codes, QR-code registration, and an example.com TOTP login flow.
- What you can do after
- Apply it via HOTP or TOTP to authenticate users without exposing their long-term symmetric keys.
Authorization in Action
A one-time password is a temporary authentication code intended to be accepted only once or during a limited validity period.
- How it is used
- Strengthens password-based login by adding possession evidence during multifactor authentication.
- How deep it goes
- Explains registration, factor binding, delivery methods, and security-usability trade-offs, but does not detail code-generation internals.
- Examples
- Uses SMS and email PINs, authentication-app codes, push notifications, and an identifier-and-factor login flow.
- What you can do after
- Apply one-time codes as possession factors and compare their phishing, interception, usability, and MFA-fatigue risks.
Also covered in
What to know first
- password authenticationPassword authentication is a method of verifying a claimed identity or access by checking a supplied secret password, often alongside a user identifier.
- authenticationAuthentication is the process of verifying the claimed identity of a user, service, device, or other entity.
- phishingPhishing is a social-engineering attack that uses deceptive communications or content to impersonate a trusted source and induce disclosure of information or another unsafe action.
Related concepts
- HOTPincludes · HOTP is a one-time-password algorithm that derives authentication codes from a secret key and a counter.
- multifactor authenticationpart of · Multifactor authentication is an identity-verification method requiring evidence from at least two distinct authentication-factor categories.
- password authenticationcontrasts with · Password authentication is a method of verifying a claimed identity or access by checking a supplied secret password, often alongside a user identifier.
- password reset flowused by · A password reset flow is a process for replacing an account password, often after verifying control of the associated account.
- possession factorkind of · A possession factor is an authentication factor based on the claimant’s control of a required physical item or device.
- TOTPincludes · TOTP is a one-time-password algorithm that generates short-lived authentication codes from a shared secret and the current time.
Questions about one-time code
What is one-time code?
A one-time code is a temporary authentication credential intended to be accepted for a single use or during a limited validity period.
Which Manning books explain one-time code?
Software Security for Developers, Architecting Accessibility, Real-World Cryptography and Authorization in Action.
What should I know before learning one-time code?
Manning books that teach one-time code usually introduce password authentication, authentication, phishing and SMS first.
What is the difference between one-time code and password authentication?
A one-time code is a temporary authentication credential intended to be accepted for a single use or during a limited validity period. Password authentication is a method of verifying a claimed identity or access by checking a supplied secret password, often alongside a user identifier.
What kinds of one-time code are there?
Kinds of one-time code include HOTP and TOTP.
What is one-time code a kind of?
One-time code is a kind of possession factor. A possession factor is an authentication factor based on the claimant’s control of a required physical item or device.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



