Skip to content
  1. Docs
  2. Checkout
  3. SMS login (OTP)

SMS login (OTP)

How to enable login with a one-time SMS code in the Trust template for OpenCart 3: code length and expiry, brute-force protection, attempt logs.

1 min read

Customers log in with their phone number: they enter the number, get an SMS with a one-time code (OTP) and enter it — no password needed.

Login window on the storefront

Requires the SMS Notify module. Codes are sent by your SMS provider connected in the SMS Notify module. Its “SMS Authorization” template must be active — otherwise a warning appears in the OTP settings.

Settings

Open Octemplates → Modules → Authorization by SMS (OTP).

SMS login settings

SettingWhat it doesRecommended
StatusEnables login by code.
OTP LengthNumber of digits in the code, from 4 to 10.6
OTP ExpiryHow many minutes the code is valid.5
Max AttemptsHow many wrong numbers or codes are allowed before lockout.5
Lockout TimeFor how many minutes login is blocked after too many attempts.15
Throttle TimeMinimum seconds between code requests — protection against spam and unnecessary SMS costs.60
Send OTP on Email AuthorizationIf the customer logs in by email, the code is sent by email.
Enable LoggingRecords login attempts on the “OTP Logs” tab.

Tip. Don’t set “Throttle Time” below 30 seconds: every SMS costs money, and bots can request codes in bulk.

Logs

  • OTP Logs — all code entry attempts: contact, customer, status and date. Helps when a customer says the code didn’t arrive.
  • IP Logs — IP addresses that entered a wrong number or code, the number of attempts and the time of the last one. This reveals guessing attempts.

OTP logs

The “Delete Logs” button clears the list.