After getting started with WalletKit in your project, you can offer two-factor authentication (2FA) for your users’ smart accounts. The second factor added is a Passkey that is stored locally on your users device and multiple Passkeys can be added to enable a user to act across many devices.

If 2FA is enabled for a user, the second factor is automatically prompted in existing signature and transaction hooks, leaving your developer experience untouched.


Prompt users to activate 2FA with the use2fa hook.

import { use2fa } from "@groupos/walletkit";

function Page() {
  const { devices, addDevice, removeDevice } = use2fa();

  return (
        {, i) => (
          <div key={`device-${i}`}>
            <button onClick={() => removeDevice(device)}>Remove</button>
      <button onClick={() => addDevice()}>Add Device</button>