Pair your phone with your account
A signed pairing token, scanned via QR. No password re-entry on the device; the token carries your identity and expires in 5 minutes.
How it works
On /devices/pair, the web app asks the API for a pairing token. The API mints an HMAC-signed token (keyed with the same secret Better-Auth uses, so we don't need a side-channel) that embeds your user id and an expiry 5 minutes in the future. The token is encoded as a QR code.
The Android app scans the QR with the camera, then calls POST /v1/trpc/devices.redeemPairingToken with the token plus the device's metadata (label, OS version, FCM push token, install source). The API verifies the signature and expiry, creates a device row under your user id, and returns the device id.
Doing it step by step
- On your laptop, sign in and visit /devices/pair.
- On your phone, open the smartordercapture app and tap Pair with cloud in the onboarding flow.
- Grant the camera permission when prompted.
- Point the phone at the QR code on your laptop screen. The app vibrates briefly and the device appears in your dashboard.
If the QR expires
Tokens last 5 minutes. If you leave the page open longer, refresh to mint a new one. The QR page also surfaces a countdown.
Pairing multiple phones
Pro and Team plans let you pair as many devices as you like. Each one shows up separately in the dashboard with its own run history. Workflows are assigned per-device, so a workflow living on your phone doesn't automatically run on your spare phone.
Unpairing
Open the Devices page, click the device, then Unregister. The cloud drops the device row, FCM stops pushing to it, and the app shows an "unpaired" banner on next open. Local workflow caches stay until you uninstall.