Prompt
How do I support cross-device passwordless login?
Latest observation
Oct 28, 2026
OpenAI APIWeb search: off
To support cross-device passwordless login, the most common and standards-based approach is passkeys with WebAuthn / FIDO2.
What “cross-device” means
A user can start sign-in on one device, then approve it using another device they already trust, for example:
- Start login on a laptop
- Approve with a phone via QR code / Bluetooth / proximity
- Or use a synced passkey from the phone on the laptop
Best approach: Passkeys
Passkeys are built on WebAuthn and can be:
- Device-bound: stored on a single device or security key
- Synced / multi-device credentials: backed up and synced across the user’s devices via iCloud Keychain, Google Password Manager, etc.
This gives you both:
- passwordless sign-in
- cross-device authentication
How it works at a high level
-
Registration
- User creates a passkey on a device.
- Your server sends a WebAuthn challenge.
- The device creates a credential pair:
- private key stays on the authenticator
- public key is sent to your server and stored
-
Login
- Your server sends a fresh challenge.
- The user proves possession of the private key by signing the challenge.
- Your server verifies the signature using the stored public key.
-
Cross-device flow
- If the user is on a device without the credential, the browser/platform can offer:
- passkey from another device
- QR-code-mediated nearby approval
- The user approves on their phone, and the browser completes the login.
- If the user is on a device without the credential, the browser/platform can offer:
What you need to implement
1) WebAuthn server endpoints
You typically need:
POST /webauthn/register/optionsPOST /webauthn/register/verifyPOST /webauthn/login/optionsPOST /webauthn/login/verify
2) Store credential metadata
For each user, store:
- credential ID
- public key
- sign counter / related metadata
- optional transports, attestation info, user handle
3) Use the right WebAuthn options
For passwordless login:
userVerification: "required"residentKey: "preferred"or"required"if you want discoverable credentialsauthenticatorSelectiontuned for passkeys
For cross-device use, make sure your UX supports:
- discoverable credentials
- platform UI for passkeys
- fallback to QR/Bluetooth-based nearby device flow where supported
4) Use HTTPS and correct origin/RP ID
WebAuthn requires:
- HTTPS
- matching relying party ID (
rpID) - correct origin validation
Recommended UX
- “Sign in with a passkey”
- Provide “Use another device” automatically when appropriate
- Offer fallback methods:
- email magic link
- one-time code
- backup passkey / security key
- account recovery flow
Libraries you can use
Depending on your stack:
- Node.js:
@simplewebauthn/server,@simplewebauthn/browser - Java:
webauthn4j - Go:
duo-labs/webauthn - Python:
webauthn - .NET: FIDO2 libraries such as
fido2-net-lib
Important considerations
- Don’t rely on browser fingerprinting for auth
- Have a recovery path if the user loses all devices
- Support multiple passkeys per account
- Consider step-up auth for sensitive actions
- Make sure your login flow handles multiple authenticators gracefully
If you want the shortest answer
Use passkeys via WebAuthn with discoverable credentials and a UI that supports cross-device authentication (QR code / nearby device approval). This is the modern, secure way to do passwordless login across devices.
If you want, I can also show:
- a reference architecture,
- server/client code, or
- a step-by-step implementation for your specific stack.