Menu

Express Node.js SMS Recovery — Enforcing OTP Resend Cooldown and Max Attempts
📰

Express Node.js SMS Recovery — Enforcing OTP Resend Cooldown and Max Attempts

DEV Community: authentication·BarnabyVance6852·about 5 hours ago
#32ZBGv4S
#devtoauthentication#devto#dev#recovery#time
Reading 0:00
15s threshold

TL;DR: For an Express Node.js service handling passwordless phone login or a short-lived password-reset message, keep cooldowns, attempt caps, and expiry decisions in the backend, then hand an admitted send to the SMS provider. Buying hosted OTP delivery reduces integration work; it does not transfer ownership of the authorization decision. A fintech recovery flow should make that distinction before choosing an SDK.

Consider a food-delivery courier recovering access to a payout account. The SMS is a means of proving control of a phone number; the application must still decide what that proof authorizes. A successful phone challenge should not silently become permission to change payout details.

The failure scenario worth reviewing is small: a courier taps resend while the first request is still in flight, and the backend receives two requests against the same recovery session. This is a hypothetical design exercise, not a reported incident.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.