Design a secure SMS OTP login flow around separate receipt and authentication paths: a settled payment creates the receipt-send intent, while SMS OTP controls later access to the learner's account. A delayed login text should not make a settled order disappear from the receipt workflow.
TL;DR: A secure SMS OTP login flow for US/EU SaaS needs application-owned rate limiting, bounded retries, temporary lockouts, short expiry, and atomic replay protection. For an edtech checkout, persist the receipt intent with the settled-payment transition; keep authentication attempts in a different state machine. Provider acceptance and recipient delivery are different observations.
How should a secure SMS OTP login flow relate to payment?
Consider an illustrative order, course-481, whose payment has settled. The application records that transition and a receipt intent together. A worker sends the receipt, records the resulting provider identifier, and reconciles delivery observations.…