# OTP authentication — approval-required provider integration Scope: `user.auth.sendOtp`/`verifyOtp`, provider verification credentials, automatic mobile-account creation and auth cookie/token. **Excluded from the default password regression.** Run only with explicit approval and an isolated SMS provider sandbox/test adapter. Never send to real customer mobiles, brute-force a real provider, or use a hardcoded production bypass code. | ID | Priority | Action / input | Expected result | |---|---|---|---| | OTP-01 | P1 | Approved test mobile requests code then verifies provider-valid code. | Correct customer identity/token/cookie; one successful verification. | | OTP-02 | P1 | Verify approved new mobile without pre-existing account. | Exactly one mobile account created; no duplicate credential/detail rows. | | OTP-03 | P0 | Existing password account verifies same mobile. | Same identity recovered, not a second customer losing history. | | OTP-04 | P0 | Wrong/empty/malformed OTP, no prior send or expired credentials. | Safe denial; no authenticated session or auto-created account. | | OTP-05 | P0 | OTP for mobile A submitted with mobile B. | Binding enforced; cannot authenticate another account. | | OTP-06 | P0 | Reuse successful code/verification ID. | Approved one-time guarantee; no replay-created account/session bypass. | | OTP-07 | P1 | Resend code before verifying previous code. | Defined supersession/validity; no ambiguous multiple active credentials. | | OTP-08 | P1 | Expiry exact boundary and client clock skew. | Provider/server time authoritative, clear expiry/retry. | | OTP-09 | P1 | Invalid phone length/prefix/country format/whitespace. | Agreed normalization consistent with password/account mobile identity. | | OTP-10 | P0 | Bounded abuse/rate-limit checks in isolated adapter. | Approved retry/cooldown controls; no unbounded messages or guess attempts. | | OTP-11 | P1 | Provider timeout/error on send or verify. | Recoverable error; no false success or unusable half-account. | | OTP-12 | P1 | Concurrent valid verifies for same new mobile. | One identity, consistent account state; no duplicate registration race. | | OTP-13 | P0 | Verification returns token/cookie/logs. | No provider secret/OTP credentials leaked; secure intended session transport. | | OTP-14 | P1 | Suspended/deleted-account mobile uses OTP. | Approved account restoration/suspension policy, no bypass of order restrictions. | | OTP-15 | P2 | UI requests resend/verification then background/back/offline retry. | No automatic real repeated sends; safe state recovery and destination return. | Policy checkpoints: resend supersession, attempt limits, expiry, deleted-account re-creation and token/cookie semantics. These are expected integration requirements, not claims that current provider behavior is implemented or tested.