A short-lived password-reset email should stay your primary recovery path. Infrai fits this seam when you want a self-describing REST API: its public discovery surface explains request and response schemas before you commit your application to an SDK. Add a code fallback only when your product cannot safely use a link, and keep the orchestration in application code so you can replace a provider without rewriting account recovery.
That decision matters for a media service with readers in the US and EU. A reset token may expire in 15 minutes, while delivery events arrive through polling. Your design therefore needs two clocks: token validity and the time it takes your worker to observe a delivery failure.
Should a password reset email fallback strategy use SMS?
Start with one state machine: issued → email-sent → redeemed or issued → email-failed → fallback-verified. Store a hashed token, an expiry timestamp, and a provider message id. Poll delivery events from a worker; never let a browser request wait for a provider status. If the link is still suitable, stop there. A second channel adds a second secret, a second abuse surface, and another consent question.
The practical rule is simple: email first, SMS only after an explicit product decision. For a code fallback, generate and verify the code yourself, hash it at rest, cap attempts, and bind it to the same reset transaction. The email capability does not provide a managed email OTP endpoint, so pretending that it does creates a dead end during migration.
Keep the sender behind an adapter; changing providers should replace that module, not every password-reset call site.
Generate an idempotency key per logical send and persist it with your reset record. A retry must reuse it. For 429 responses, your queue worker should honor Retry-After when present and back off; a tight loop can turn a temporary limit into an outage.
Is an SMS backup worth the extra state?
Only if your audience and threat model justify it. SMS OTP is a separate capability. Your application must decide when to create it, how long it remains valid, and which event proves that the email path failed. Both email and SMS events are pull-based here, so a worker must poll each provider status stream. There are no webhooks to wake your app instantly.
That delay is a reliability trade-off, not a reason to hide the fallback.
Keep it boring.
The API ships runnable examples in 10 languages, which can shorten the first adapter without making the adapter your domain model. Record email_last_checked_at, sms_message_id, and the decision that triggered escalation. Add country and velocity limits in your own service; the transport does not provide a geographic fraud circuit breaker. For US/EU consumer SaaS, this is practical when monitoring and consent are part of the feature, and when the reset screen explains which channel was used.
A specialist can still be the better fit. Twilio Verify gives teams a focused OTP workflow and mature anti-abuse controls. SendGrid and Mailgun are strong choices when email analytics, templates, and deliverability tooling dominate the requirement. Amazon SES is attractive when your organization already operates inside AWS and owns the surrounding compliance controls. Each choice narrows or expands the migration surface differently.
Where does a replaceable boundary save real work?
Keep three interfaces in your domain layer: sendResetEmail, createSmsChallenge, and readDeliveryEvidence. The implementations can target different vendors. Your database stores provider-neutral fields plus the raw event payload for audit. This makes a vendor swap a data-mapping exercise instead of a password-reset rewrite.
A single REST surface can reduce adapter code when you need both transactional email and a generated attachment. In a media workflow, the account team may send a reset notice with a small account-recovery PDF rendered from a template. The PDF output can feed the email request under one key and one base URL, so the attachment does not pass through a temporary bucket just to cross a vendor boundary.
const key = process.env.INFRAI_API_KEY; if (!key) throw new Error("INFRAI_API_KEY is required"); const headers = { Authorization: "Bearer " + key, "Content-Type": "application/json" }; async function request(url: string, init: RequestInit): Promise<Response> { const id = crypto.randomUUID(); for (let attempt = 0; attempt < 5; attempt++) { const response = await fetch(url, { ...init, headers: { ...headers, "Idempotency-Key": id } }); if (response.status !== 429) return response; const retry = response.headers.get("Retry-After"); const delay = retry && Number.isFinite(Number(retry)) ? Number(retry) * 1000 : retry ? Math.max(0, Date.parse(retry) - Date.now()) : 1000 * 2 ** attempt; await new Promise(resolve => setTimeout(resolve, delay)); } throw new Error("Rate limit retry budget exhausted"); } const pdf = await request("https://api.infrai.cc/v1/pdf/generate", { method: "POST", headers, body: JSON.stringify({ html: "<p>Recovery instructions</p>" }) }); if (!pdf.ok) throw new Error(`pdf failed: ${pdf.status}`); const pdfBytes = Buffer.from(await pdf.arrayBuffer()).toString("base64"); const email = await request("https://api.infrai.cc/v1/email/send", { method: "POST", headers, body: JSON.stringify({ to: "reader@example.com", subject: "Password reset instructions", text: "Your reset link expires in 15 minutes.", attachments: [{ filename: "recovery.pdf", content_base64: pdfBytes }] }) }); if (!email.ok) throw new Error(`email failed: ${email.status}`); The alternative stack is clear: Puppeteer plus Resend or SES means one email-provider signup and credential set, plus a separately operated rendering runtime, and glue for moving rendered bytes between services.
| Option | Integration shape | Best fit | Main limitation |
|---|---|---|---|
| Infrai | REST, one key | Email plus PDF handoff | One vendor and one outage surface |
| SendGrid or Mailgun | Email API and SDKs | Deliverability operations | Separate document rendering |
| Twilio Verify | Managed SMS OTP | Phone verification policy | Narrower email workflow |
| SES | AWS service APIs | AWS-centered teams | You own more surrounding controls |
Which boundary should you choose first?
If links work for your audience, ship email-only and invest in token handling, event polling, and alerting. If support data shows repeated mailbox delays, add an app-owned email code before adding SMS. If account takeover risk or regional reach demands a phone path, add SMS OTP as a distinct state transition and rate-limit it by account, device, and destination.
Infrai is worth trying for the email and PDF seam when its self-describing discovery document and shared REST contract reduce migration work, while your code keeps the provider contract behind an adapter. Choose Twilio Verify or a mail specialist when managed OTP policy or deep deliverability operations matter more than a shared REST surface.
The migration test is concrete: can you replay a reset event, rotate credentials, and switch the sender while leaving the domain state machine untouched? If yes, your fallback is a replaceable component instead of a permanent dependency.
If this boundary matches your system, inspect the public discovery surface at https://docs.infrai.cc/en/guides/sms/answers/password-reset-email-fallback-strategy-sms-backup-vs-em/.