Don't treat SMS OTP as enough for GDPR or PSD2 compliance: test login risks before trusting delivery success. For fintech signup, choose the integration by its replay behavior, with a verification link confirming a contact and a separate policy governing account access. A successful send is too weak a database fact to carry both responsibilities. Start with the replay contract, because every ambiguous retry otherwise becomes another integration decision hidden in application code.
TL;DR: SMS OTP alone does not establish GDPR or PSD2 compliance, and NIST treats telephone-network authentication as restricted rather than phishing resistant. For a fintech account signup, deliver the verification link through a replaceable transport, then test what happens when delivery repeats or confirmation arrives twice. The useful integration boundary is the smallest durable state transition whose meaning survives those failures.
A pharmacy refill alert raises the same underlying question: does reaching a phone prove enough to authorize access to an account? No. A reminder, a contact-verification event, and an authenticated session represent different claims. This decision record uses fintech signup as the concrete implementation and integration effort as the deciding constraint; it does not assume that pharmacy obligations and payment-service obligations are interchangeable.
Can SMS OTP retries prove enough for GDPR and PSD2 compliance?
The decision is to make contact confirmation a transaction with a replayable outcome. Assume a confirmation commits, but the browser never receives the response. The next request must discover that the same challenge has already completed its narrow job; it must not turn a retry into another authorization event, create another delivery job, or silently verify a different contact. This is a proposed application contract, not a timeout or schema prescribed by a regulator.
Keep three invariants. The challenge identifies one contact version and one purpose. An eligible challenge can change from pending to consumed only once. Contact verification alone never grants account access. Those rules allow the delivery adapter to remain small because it does not have to decide what a duplicate means for the account.
Retries expose semantics.
A storage-oriented review should ask where these rules are enforced. If a worker records success in an object log and another process eventually updates the contact, there is an interval in which the application has two competing answers about completion. Keep eligibility, consumption, and the contact update inside one transaction; use an asynchronous audit copy for evidence under a defined retention policy, rather than as the authority for the current decision. The trade-off is a synchronous database dependency on confirmation, with a correspondingly smaller set of intermediate states to reconcile. This also places a limit on what the evidence means. A bearer link establishes possession of its secret at redemption. Without additional binding, it cannot establish that the browser redeeming the link is the browser that started signup. Binding to the initiating session adds integration and recovery work; that work is justified only if the selected threat model requires that relationship.
Durability isn't identity.
Compare the work left after the happy path
The comparison below concerns application designs, not messaging products. Integration effort is assessed qualitatively by the state and failure handling the team must own; these are design judgments, not measured implementation times.
| Design under review | Additional application work | Failure that remains | Decision for this signup |
|---|---|---|---|
| Contact link with an atomic confirmation result | Challenge state, restricted delivery job, expiry, contact version, replay outcome | Stolen or forwarded bearer link can confirm a contact | Accept for contact verification with a separate access policy |
| SMS OTP used as the entire login decision | Attempt limits, telephone lifecycle, recovery, assurance assessment | SIM swap and phishing can invalidate assumptions about the recipient | Reject as a complete compliance claim |
| Contact confirmation plus a phishing-resistant authenticator | Authenticator registration and recovery in addition to delivery | Recovery can undermine the stronger ceremony | Evaluate for the account-access assurance requirement |
The apparent shortcut in the second row comes from omitting work, not from eliminating its necessity. A digits-only screen still needs an answer for number reassignment and a user who relays a code to a phishing site. Replacing the digits with a URL does not repair the telephone channel.
NIST SP 800-63B-4 describes public telephone network authentication as restricted and discusses SIM changes and number porting as risk indicators. It also distinguishes manually entered OTPs from phishing-resistant authentication and requires an offered phishing-resistant option at AAL2. Those are concrete boundaries when claiming alignment with that assurance level; they do not establish which US legal obligations apply to an arbitrary commercial service.
Count recovery too.
For integration planning, the important comparison is therefore between the responsibilities retained by each design. Message delivery, contact confirmation, authenticator enrollment, and account recovery each require an owner. Putting them behind one callback does not make their failure meanings identical.
Execute the transition before trusting the receipt
The following Python is an executable model of the confirmation contract. It deliberately uses an in-memory record so the replay behavior is visible; it provides no concurrent or durable storage guarantee. A production repository must perform the corresponding checks and update in a transaction, with the eligibility check protected against concurrent confirmation. The caller obtains the current contact version from authoritative account state.
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from enum import Enum
class Outcome(Enum):
CONFIRMED = "confirmed"
ALREADY_CONFIRMED = "already_confirmed"
REJECTED = "rejected"
@dataclass
class Challenge:
contact_version: int
expires_at: datetime
purpose: str = "signup-contact"
consumed_at: datetime | None = None
def confirm(challenge, current_contact_version, now):
if challenge.purpose != "signup-contact":
return Outcome.REJECTED
if challenge.contact_version != current_contact_version:
return Outcome.REJECTED
if challenge.consumed_at is not None:
return Outcome.ALREADY_CONFIRMED
if now >= challenge.expires_at:
return Outcome.REJECTED
challenge.consumed_at = now
return Outcome.CONFIRMED
# Illustrative test time and lifetime, not a compliance threshold.
now = datetime(2026, 1, 1, tzinfo=timezone.utc)
challenge = Challenge(contact_version=2, expires_at=now + timedelta(minutes=10))
assert confirm(challenge, 2, now) is Outcome.CONFIRMED
# The response was lost; the browser retries the same confirmation.
assert confirm(challenge, 2, now) is Outcome.ALREADY_CONFIRMED
# A superseded contact must not inherit a previous confirmation.
assert confirm(challenge, 3, now) is Outcome.REJECTED
Notice the order: an already consumed challenge can return its historical outcome after expiry, provided its contact version and purpose still match. That response must convey an earlier completion, never fresh authorization. An unused expired challenge is rejected. A team may choose a less revealing public response for privacy, while preserving these distinctions internally.
This is only the state transition.
Token validation must precede it. Generate the bearer secret with a cryptographically strong source such as Python's secrets module, associate its digest with the challenge, and limit access to the delivery payload, which necessarily contains or can obtain the usable link. Neither a digest in one table nor an encrypted audit bucket protects a token copied into an unrestricted worker log.
Require explicit confirmation before mutation. HTTP defines GET as safe, and security scanners or previews can fetch a link before a person acts; allowing that fetch to consume the challenge couples contact state to automated inspection. An explicit confirmation action adds interaction work but gives the mutation an intentional boundary. Session binding and CSRF protection must follow the surrounding application's threat model.
The integration test should cross the real persistence boundary. Race two confirmations and verify that only one performs the contact update. Then lose the response after commit, retry, and inspect both the outcome and account permissions. Also test expiry before first redemption and a contact change before redemption. The small model above cannot verify database isolation, so passing its assertions is insufficient evidence for those concurrency claims.
Reject the shortcut, preserve its legitimate role
The rejected option is accepting a delivery receipt or an SMS OTP as the entire compliance decision. The valid role is narrower: transport evidence supports delivery operations; contact verification supports signup; telephone-based authentication may participate where the applicable assurance policy permits it and its restrictions have been assessed. None of those labels grants a blanket EU or US compliance result.
GDPR Article 32 requires security appropriate to risk, while Article 5 addresses purpose limitation, data minimization, and storage limitation. Collecting every message body indefinitely can increase the retained personal data without resolving the authentication question. Retain evidence that answers a defined review question, with an explicit retention decision for each category.
PSD2 Article 97 applies strong customer authentication to specified payment-service activities, including online payment-account access and electronic payment initiation. The associated technical standards address independent authentication elements and dynamic linking for remote electronic payments. A signup link does not supply that transaction-specific assessment. Even a password-plus-SMS screen needs review against the actual requirements rather than an assumption that two interface steps establish compliance.
That boundary matters in the pharmacy framing too: successful refill-alert delivery cannot stand in for a patient-account access decision. Establish the obligations for that service separately.
Release only after the ambiguous cases are observable
Deploy the confirmation schema and its delivery handoff as one reviewed change. An outbox or equivalent durable handoff can record the delivery job in the same transaction as the challenge, allowing the worker to retry transport without issuing a fresh verification event. Resends need a specified policy for existing challenges; otherwise support and engineering may interpret an older valid link differently.
Watch queue age, expired challenges, replay outcomes, and contact-version rejections separately from transport acceptance. Correlation identifiers let support trace a signup without retaining raw tokens, full verification URLs, or message bodies in routine logs. Test the worker's retry behavior independently of the confirmation transaction, because a second delivery and a second state mutation are different failure modes. Message volume and retries matter operationally, but transient unit prices do not settle this integration decision.
Email and SMS also carry delivery controls outside the account database. RFC 7208 defines SPF checks on authorized sending hosts; it does not authenticate the human recipient. CTIA messaging guidance concerns another operational layer. Use those sources for the questions they actually address.
The release criterion is concrete: demonstrate that duplicate delivery, lost responses, and changed contacts preserve the meaning of the stored verification result, then review account access against its separate assurance policy. That is the integration effort to budget. A successful send alone cannot answer whether SMS OTP is enough.
References
- NIST SP 800-63B-4, Authentication and Authenticator Management: https://pages.nist.gov/800-63-4/sp800-63b.html
- GDPR, especially Articles 5 and 32: https://eur-lex.europa.eu/eli/reg/2016/679/oj
- PSD2, especially Article 97: https://eur-lex.europa.eu/eli/dir/2015/2366/oj
- Strong customer authentication regulatory technical standards: https://eur-lex.europa.eu/eli/reg_del/2018/389/oj
- RFC 9110, HTTP Semantics, safe methods: https://www.rfc-editor.org/rfc/rfc9110.html#section-9.2.1
- Python secrets documentation: https://docs.python.org/3/library/secrets.html
- RFC 7208, Sender Policy Framework: https://datatracker.ietf.org/doc/html/rfc7208
- CTIA messaging interoperability and compliance guidance: https://www.ctia.org/the-wireless-industry/industry-commitments/messaging-interoperability-sms-mms
Top comments (0)