One-Time Password
A one-time password (OTP) is a temporary code that works only once and usually expires after a short period, used to help verify a user's identity when they sign in or complete an action. It is often delivered to something the user has, such as a phone via SMS, an email address, or a dedicated authenticator app. Because each code is valid for a single use, an OTP is harder for an attacker to reuse than a static, reusable password.
A one-time password (OTP) is a single-use authentication credential, typically valid for one login session, transaction, or action and often constrained to a short validity window. It generally functions as a possession-factor proof: the code is either generated by or delivered to a device or channel associated with the user (for example an authenticator app, SMS, or email), so that presenting the correct code demonstrates control of that channel. In practice OTPs are most commonly deployed as one factor within multi-factor or two-factor authentication rather than as a standalone authenticator, and they address authentication (verifying identity) rather than authorization. Specific generation and delivery mechanisms, algorithms, code length, and expiry behavior vary by implementation; details beyond what the cited sources establish are out of scope for this entry.
Why it matters
Static, reusable passwords remain one of the weakest links in identity systems: once captured through phishing, credential stuffing, or a database breach, they can be replayed by an attacker indefinitely until rotated. A one-time password mitigates this specific weakness because each code is valid only once and, in most deployments, only for a short window. Even if an OTP is intercepted or observed, its usefulness to an attacker degrades quickly, which raises the cost of straightforward credential-replay attacks.
OTPs matter most as a second factor within two-factor or multi-factor authentication rather than as a replacement for the primary credential. By binding a login or transaction to something the user has, a device or channel that receives or generates the code, an OTP adds a possession-factor check on top of a knowledge factor such as a password. This layering is why OTP-based verification is common for high-value actions like signing in from a new device, authorizing a payment, or confirming a sensitive account change.
It is important to recognize that OTPs address authentication only: they help verify identity but do not determine what an authenticated user is permitted to do, which remains an authorization concern. The strength an OTP provides also depends heavily on its delivery channel and implementation; the security properties of SMS delivery, email delivery, and app-generated codes differ, and the details of those tradeoffs are beyond the scope of this entry.
Who it's relevant to
Inside OTP
Common questions
Answers to the questions practitioners most commonly ask about OTP.