Skip to main content
Menu
Search
Users, Roles & Permissions

Protect Staff Sign-in with Two-Factor Sign-in

Two-factor sign-in is off until an admin turns it on. Then Admin, Owner and other powerful roles confirm each sign-in with a code from their phone.

Two-factor sign-in adds a second step after the password. Staff enter a 6-digit code from an authenticator app on their phone, such as Google Authenticator, Microsoft Authenticator or 1Password. A stolen password alone is then not enough to get in.

Two-factor sign-in is available from SalePro 6.4.

Before you start#

  • It is off by default. New installations and updated installations both start with it off. Everyone signs in as before until an admin turns it on.
  • You need an Admin or a user who can open Settings → General Setting.
  • Check that SalePro can send email (Settings → Mail Setting). The email code is the backup when a phone is not at hand.
  • Tell your staff before you turn it on. Affected users must set it up at their next sign-in.

Tip: Set it up for your own account first, from your profile. Then you know the steps before your staff meet them.

Who must use it#

When two-factor sign-in is on:

User Required?
Admin and Owner Always.
Any role that can change settings, add, edit or delete users, manage roles, or delete records Always. This includes most cashier roles, because they can usually delete something.
Other roles Only if you switch it on for that role.
eCommerce customers Never.

Any staff member can still turn it on for themselves from their profile, even when it is off for the business.

Note: Two-factor sign-in only changes the staff sign-in page. Access with API tokens, the POS approval PIN and eCommerce customer sign-in are not affected.

Step 1 — Turn on two-factor sign-in#

  1. Open Settings → General Setting.
  2. Tick Two-factor sign-in.
  3. Save the page.

From now on, Admin, Owner and the roles listed above are asked to set up an authenticator app at their next sign-in.

Note: On a demo installation this setting cannot be changed.

Step 2 — Require it for other roles (optional)#

  1. Open Settings → Role Permission.
  2. In the role's row, open Action → Change Permission.
  3. At the top of the page, switch on Require two-factor sign-in for this role.
  4. Save the permissions.

If the switch is already on and greyed out, the role is always required, because it is Admin or Owner or has one of the powerful permissions. If two-factor sign-in is still off in General Setting, the page tells you that the switch applies once it is turned on.

Step 3 — What staff see at their next sign-in#

A user who must use two-factor sign-in enters their password as usual. SalePro then opens Set up two-factor sign-in and does not let them continue until it is done.

  1. Open the authenticator app on the phone and add an account.
  2. Scan the QR code on the screen. If the phone cannot scan it, type the Setup key instead (Copy key copies it).
  3. Type the 6-digit code that the app shows into Code from the app.
  4. Click Turn on two-factor sign-in.
  5. SalePro shows Save your recovery codes: 10 codes, shown only once. Use Copy, Download or Print and keep them somewhere safe.
  6. Click I saved my codes, continue.

Step 4 — Signing in after set-up#

After the password, the Two-factor sign-in page asks for the 6-digit code from the authenticator app.

  • Tick Remember this device for 30 days to skip the code on this browser for 30 days.
  • No phone? Under Other ways to sign in, choose Use a recovery code (each code works once) or Email me a code.
  • The email code is 6 digits and works for 10 minutes. You can ask for up to 3 email codes in 10 minutes.
  • After 5 wrong codes, wait a minute and try again.
  • If you wait more than 10 minutes on this page, sign in again from the start.

Manage your own two-factor sign-in#

Open your profile (User Profile). The Two-factor sign-in card shows whether it is On or Off.

  • Set up two-factor sign-in starts the set-up if it is off.
  • Recovery codes left shows how many unused codes you have. Enter your current password and click New recovery codes to get 10 new ones. The old codes stop working.
  • Remembered devices lists browsers that skip the code. Forget all remembered devices makes every browser ask for a code again.
  • Turn off two-factor sign-in needs your current password. It is not offered if your role requires two-factor sign-in.

Reset a user who lost their phone#

  1. Open People → User List.
  2. In the user's row, open Action → Reset two-factor, and confirm.

The user's authenticator app, recovery codes and remembered devices stop working. If their role requires two-factor sign-in, they set it up again at their next sign-in. The reset is written to the activity log. You can also reset from the user's edit page. Only an Admin can reset another Admin.

If the only admin is locked out#

If the only admin has lost both the phone and the recovery codes, someone with access to the server can reset them. Run this in the SalePro folder, with the admin's user ID, username or email:

php artisan two-factor:reset admin@example.com

The admin can then sign in with the password and set up two-factor sign-in again. This reset is also written to the activity log.

Check that it works#

  1. Turn on Two-factor sign-in in Settings → General Setting.
  2. Sign in as a test user whose role is required. Confirm that SalePro opens Set up two-factor sign-in.
  3. Finish the set-up and save the recovery codes.
  4. Sign out and sign in again. Confirm that the code page appears and the app code works.
  5. Sign out and sign in with a recovery code. The message says how many codes are left.
  6. Sign in once more with Remember this device for 30 days ticked. Sign out and back in: no code is asked.
  7. As an Admin, use Reset two-factor for the test user and confirm they must set it up again.

Common problems#

Problem What to check
"That code is not valid" The phone's clock must be set automatically. Codes change every 30 seconds, and a code can be used only once.
The email code does not arrive Check Settings → Mail Setting and the spam folder. The user must have an email address. Use the app or a recovery code meanwhile.
"Too many attempts" Wait the number of seconds shown, then try again.
A user cannot turn it off Their role requires it. Change the role, or turn off Two-factor sign-in in General Setting.
The role switch is greyed out The role is Admin or Owner, or can change settings, manage users or delete records. It is always required while two-factor sign-in is on.
The Reset two-factor action is missing It shows only for users who have two-factor sign-in on, and only to users who can edit users. Only an Admin can reset another Admin.
Everyone is still signing in without a code Two-factor sign-in is off in General Setting, and the users have not turned it on themselves.
Did this guide solve your problem?

If something is unclear, tell support which guide and section you were following.

Get help
WhatsApp