Packages

@onmax/better-auth-mobile-qr

Better Auth plugin for desktop-to-phone QR sign-in.

@onmax/better-auth-mobile-qr

This package owns the QR challenge lifecycle and desktop session claim.

Exports

  • @onmax/better-auth-mobile-qr
  • @onmax/better-auth-mobile-qr/client

Server API

server.ts
import { mobileQrSignIn } from '@onmax/better-auth-mobile-qr'

Important options:

  • appName
  • endpointPrefix
  • trustedOrigins
  • providers
  • challengeTtlSeconds
  • returnTo
  • signingPathTemplate
  • autoCreateUser
  • enforceOrigin

Client API

client.ts
import {
  getMobileQrChallenge,
  pollMobileQrSignIn,
  startMobileQrSignIn,
  completeMobileQrSignIn,
} from '@onmax/better-auth-mobile-qr/client'

Use the client helpers on desktop. Use @onmax/mobile-signer-bridge on the phone page when you want a provider-agnostic completion flow.

Copyright © 2026