mobile-screen-buttonTwo-device approvals (channels)

Use channels when one device drives the UI and another device approves.

Use channels when one device drives the UI and a second device approves.

Typical cases:

  • Checkout terminals.

  • NFC-only passkeys (approve on a phone).

Channel setup

Create a channel

Create a channel on the “driver” device. Then show url as a QR code or deep link.

Create a channel
import { RevibaseProvider } from "@revibase/lite";

const provider = new RevibaseProvider();
const { channelId, url } = await provider.createChannel();
// Show `url` as a QR code or deep link.

Use the channel

Pass channelId to signIn and any follow-up calls.

Sign in / transact via channel
import { signIn, transferTokens } from "@revibase/lite";

const { user } = await signIn(provider, { channelId });

const { txSig } = await transferTokens(
  provider,
  { amount: 1_000_000n, destination: "DESTINATION_WALLET_ADDRESS", signer: user },
  { channelId },
);

Track status

Subscribe to channel status changes. Use this to drive UX (waiting screen, reconnect button, etc).

Reconnect / close

circle-info

Close channels when you’re done. Treat channelId like a short-lived session identifier.

Last updated