Skip to the products
LCPanelLicence Center Panel

Two-factor Sign-in (plugin)

Sign-in codes by SMS and on WhatsApp with a verified phone number and backup codes; the code page with "send again" and trusted browsers; a rule that makes it optional, required for staff or for everyone; code lifetime, codes per hour and the message texts. Premium; needs SMS & WhatsApp.

Plugins Updated 6 Nov 2026 47 / 50

BoxPuff already offers two-step sign-in with an authenticator app or a code by e-mail (The file manager, Security tab). The Two-factor Sign-in plugin adds two more ways to get the code: by SMS and on WhatsApp, to a phone number the member has proved is theirs. It also adds a rule that makes two-step sign-in compulsory for administrators or for everyone, and lets you set how long a code lives and how many days a browser is trusted.

Who it is for

Sites whose members live on their phones and may not read e-mail quickly - a code in the pocket is easier than a code in an inbox - and sites that want to protect staff accounts or paid accounts more firmly than a password does. It needs a way to send messages, so read SMS & WhatsApp first.

Switching it on

Two-factor Sign-in is premium: it needs the two-factor addon on your licence. Buy it on lcpanel.com, press Check again now on Admin → Configuration → License, then switch it on at Admin → Extensions → Plugins (Manage Plugins). Its page appears under Extensions as Two-factor sign-in (/admin/plugin/two-factor). Switching it on makes sure the phone columns (phone, phone_verified) exist on the users table.

Three things must be true before members see anything:

  1. Two-step sign-in is available on the site: Enable 2FA under Site Settings → Security (on by default).
  2. A sending way is ready on SMS & WhatsApp: the SMS tab with Send messages by SMS on and the gateway filled in, and/or the WhatsApp tab on a way that really sends (not the click-to-chat link). The card there says Ready when it is.
  3. The matching channel is allowed on the plugin's own page (below).

With none of the channels ready, the plugin stays out of the way: no tab, no changes to the sign-in.

The member's side

Once a channel is ready, Settings → Phone codes (/account/edit?tab=phone-codes) appears in the member's account.

  1. Save number - type the number with the country code (+8801711111111) and press the button. It is saved in international form with a Not verified badge. A number that cannot be a phone number is refused with an example.
  2. Confirm this number and switch on - press Send the code by SMS or Send the code on WhatsApp (only the channels you allow are shown). A six-digit code arrives; type it into the box and press Verify and switch on. The number turns Verified, the chosen channel becomes the member's two-step method, and ten backup codes are shown once. They should be copied somewhere safe; each works once.
  3. From then on every sign-in asks for a code (below). While phone codes are on, the number cannot be edited; to change it, switch phone codes off on the Security tab first, which is also where they are switched off. A member who changes the number has to verify it again.

A member who already uses the authenticator app or e-mail codes is told to switch that off on the Security tab before choosing a phone: one method at a time.

The sign-in challenge

After the right password the member lands on the verification page. The code is sent at once, to the channel they chose, and the page says Type the six-digit code we sent to your phone, or one of your backup codes. Under the button there is Send the code again by SMS / Send the code again on WhatsApp for each allowed channel - a member whose SMS never came can try WhatsApp. A tick box, Trust this browser for N days, spares the code on that browser for the number of days you set; it applies to every method, not only phones.

Limits that protect you from a bill:

  • A new code is not sent within 30 seconds of the last one (A code was sent a moment ago).
  • At most Codes a member may ask for per hour (8 by default) across SMS and WhatsApp together (Too many codes were asked for).
  • Ten wrong codes lock the code box for a quarter of an hour, whatever the method.

A member without a verified number cannot be sent a code and is told to use a backup code. The administrator can switch two-step sign-in off for an account from Edit User (Troubleshooting).

The admin settings

Admin → Extensions → Two-factor sign-in has two tabs: Overview (/admin/plugin/two-factor, the first page you land on) and Settings (/admin/plugin/two-factor/settings).

Overview

A page to look at, not to fill in:

  • four tiles - Members with two-step on (of all members), Codes sent today, Codes sent in 7 days (each with how many failed) and SMS / WhatsApp in 7 days;
  • one card for SMS and one for WhatsApp, each marked Ready or Not ready with the gateway's name, and saying whether members can ask for a code that way, or that it is ready but switched off on the Settings tab, or what to set up under Messaging;
  • Members by method - how many use the authenticator app, a code by e-mail, a code by SMS, a code on WhatsApp, or none - with buttons to Messaging, Templates and Settings;
  • Last 20 codes - when, the way, the masked number, the member, why (sign-in or verify) and the result, with the gateway's error under a failed one.

The gateways and the wording are set up under SMS & WhatsApp, not here; this page is where you see whether they work and who uses what.

Settings

The Settings tab has three blocks.

Channels

  • Allow codes by SMS (on) - needs an SMS gateway under Messaging.
  • Allow codes on WhatsApp (on) - needs a sending WhatsApp way under Messaging.

Rules

  • Require two-step sign-in for - Nobody (optional), Administrators and moderators or Every member. Someone who must and has not set it up is sent to the Security tab, with the note Please switch on two-step sign-in to continue., whenever they open a page of the account area or the admin panel; the account settings page and the sign-in pages stay open so they can finish. They may choose the app, e-mail or a phone, whichever is available.
  • A code works for (minutes) - 10 by default (1 to 120).
  • Trust a browser for (days) - 30 by default.
  • Codes a member may ask for per hour - 8 by default. Each one costs a message.

Messages

The wording of the two messages now comes from Admin → Configuration → SMS & WhatsApp → Templates: Sign-in code (two-step sign-in) (twofa_code) and Confirm a phone number (phone_verify), each with its live preview, SMS part count and test send (SMS & WhatsApp). Edit them there.

The two texts on this tab are only the fallback, used while the matching template is switched off or is not meant for the channel being sent:

  • Sign-in message (fallback) - default {site}: your sign-in code is {code}. It works for {n} minutes.
  • Phone verification message (fallback) - default {site}: your code to confirm this number is {code}. It works for {n} minutes.

Both take {site}, {code}, {n} and {name}; the templates take {site_name}, {code}, {minutes} and {username}, and the old words still work in them. Keep them short: an SMS with Bengali letters is split after 70 characters.

When the plugin is off

Switch it off and the Phone codes tab and the compulsory rule disappear at once; the app and e-mail ways are not touched. Members who had a phone method on can no longer be sent a code, so the verification page asks them for one of their backup codes until they switch the method off on the Security tab (or you do, in Edit User). The same happens to someone whose channel you stop allowing, or whose gateway you take out. Their data and verified numbers stay; switch the plugin back on and they work again.

Tips

  • Try the whole path with your own number and the Test only: write to the log gateway first: the code is in logs/messages.log.
  • Turn the rule on for Administrators and moderators first. Switch it to Every member only when your gateway balance and your support team are ready for it.
  • Keep Hide sign-in codes in the log on under Messaging; the code of a real message then never appears in the admin's message log.
  • Tell members to keep their backup codes. A lost phone with no backup codes is a support ticket.
Was this helpful?
Share this chapter