← Back to all posts

Two-step sign-in and verified phone numbers, built in

Two-step sign-in and verified phone numbers, built in

A password gets an account most of the way there. Two more things close the gap: a second factor for the people whose accounts matter most, and a real phone number on file for the people who need one. Both are now built into every Kreova project, on request, with nothing to code.

Two-step sign-in

Two-step sign-in adds a 6-digit code from an authenticator app (Google Authenticator, Authy, 1Password, whatever the person already uses) on top of the password. No phone number required, no SMS cost, just a QR code scanned once.

It has four settings: off, optional (anyone may turn it on for themselves), admins (every admin account must), or everyone. Turning it on for admins is one line:

set_two_factor mode: "admins"

From the next sign-in, an admin scans a QR code and enters a code to finish setting it up, and enters a fresh code on every sign-in after that. Members with "optional" turned on manage their own from an account page link, and if someone loses their phone, unlinking their authenticator so they can set up a new one is a single call too.

The only real work on the build side is making sure every login and signup form on the site knows what to do when a code is due. The platform's login and register endpoints answer with a needsCode flag instead of signing someone straight in, and the form just needs to follow it:

if (data.needsCode) {
  location.href = data.next;
  return;
}

Get that wired into every sign-in path once, and two-step sign-in works everywhere without ever touching how passwords or sessions are handled.

Verified phone numbers

The second piece is letting a signed-in member add their mobile number and prove it is really theirs. They type a number with a country code, get a 6-digit text, and confirm it. From then on the app knows their verified phone, which can be used to text them directly, and can be removed and re-verified at any time.

This one needs the project's own phone and SMS service connected first (Services, Phone and SMS), because the texts go out from the site's own number. Once that is connected, the account page's verification flow works immediately, no extra build required.

Why both together

On their own, either feature is a nice-to-have. Together they cover the two moments that actually matter: keeping the people with real access to your data (your admins, your staff) a step harder to impersonate, and having a real, verified way to reach a customer beyond email. Neither needed a line of backend code, a cron job, or a third-party integration script. Just two calls, wired into the pages that were already there.

If your project has admin accounts, staff accounts, or a portal where customers manage bookings or orders, both of these are worth turning on. Ask, and they're live in the same conversation.