Skip to content

Verify

Two-step verification for your apps

Ask for a second step after Google sign-in, or only before a sensitive action. authxi hosts the check, the setup and the page where users manage their methods. Included in every plan.

Methods

Choose which methods a workspace offers. People pick one when they set up 2FA and can add more later.

Authenticator apps

Every plan

Google Authenticator, 1Password, Authy or any app that shows 6-digit codes. Each code works once.

Backup codes

Every plan

10 single-use codes, created with the first method, for when a phone is lost.

Passkeys

Pro and up

Face ID, Touch ID, Windows Hello or a security key. Nothing to type, and they can't be phished.

Email codes

Pro and up

A 6-digit code that works for 10 minutes. It goes to the same inbox as the Google account, so prefer an app or a passkey where you can.

At sign-in

Each workspace has a mode. authxi asks once per authxi session, after Google, before your app gets the code. A remembered device can skip the step for up to 90 days, and an app can be set to always ask.
Off
No second step at sign-in. Apps can still ask for step-up checks.
Optional
People who have set up a method are asked for it when they sign in.
Required
Everyone sets up a method and uses it at sign-in. Business and up.

Pro and up

Before sensitive actions

Paying an invoice or changing a payout account deserves a fresh check, even for someone who signed in an hour ago. Call stepUp() with a reason. The user sees it on the check, passes it, and comes back to the page they were on.
  • maxAge accepts a check passed within that many seconds, so people aren't asked twice in a row.
  • A step-up is always asked, in any mode, and a remembered device never skips it.
  • Someone with no method sets one up first. Setting it up counts as passing the check.
  • If they cancel, they stay signed in and your app gets an error to handle.
billing.ts
if (!authxi.verifiedWithin(300)) {
    // The user sees "To continue: Pay invoice INV-1042", then comes back here.
    await authxi.stepUp({
        reason: 'Pay invoice INV-1042',
        returnTo: '/billing?pay=INV-1042',
        maxAge: 300,
    });
}
payouts.ts
import { verifiedWithin } from '@authxi/node';

const { url, cookie } = await authxi.createLoginRedirect({
    stepUp: true,
    reason: 'Change payout account',
    returnTo: '/payouts',
});

// After the callback
if (!verifiedWithin(claims, 300)) return res.status(403).send('Confirm it is you first.');

A security page for your users

Each workspace has a hosted page, like acme.authxi.com/account, where people add and remove methods and make new backup codes. Changes need a check from the last 10 minutes. In a workspace that requires 2FA, the last method can't be removed. Link to it from your app with authxi.accountUrl(); its back link only returns to your app's registered addresses.

In the ID token

Your app reads the result from standard claims, or with verifiedWithin(seconds) in our SDKs.

amr: ["google", "mfa", "otp"]
How the user signed in. The last value is otp, hwk (passkey), email or backup.
acr: "mfa"
Set once a check has passed in this authxi session.
mfa_time: 1764691200
When the last check passed, in seconds since the epoch.

Limits and records

Five wrong attempts end a check: your app gets access_denied and the sign-in log records the failure. Admins see who has set up 2FA, can remove a lost method or reset a user, and every change lands in the audit log.

Add two-step verification to your app

Free for up to 10,000 users a month. New companies get a 14-day Pro trial, no card needed.