Prompt
How do I make passkey login work across iOS and Android?
Latest observation
To make passkey login work across both iOS and Android, you need to support the same passkey standards on the backend and use the platform passkey APIs on each device.
The key idea
Passkeys are based on WebAuthn / FIDO2. If your app/server supports WebAuthn correctly, then:
- iOS can use iCloud Keychain / Passwords
- Android can use Google Password Manager / Credential Manager
- Users can often use the same passkey across devices if syncing is enabled
What you need
1) Use WebAuthn on the server
Your backend must support:
- Registration (create passkey)
- Authentication (sign in with passkey)
You’ll need endpoints like:
POST /webauthn/register/optionsPOST /webauthn/register/verifyPOST /webauthn/login/optionsPOST /webauthn/login/verify
Store:
- credential ID
- public key
- sign count / metadata
- user handle
Use a proven library if possible:
- Node:
@simplewebauthn/server - Go:
duo-labs/webauthn - Python:
fido2 - Java: Yubico WebAuthn Server
2) Use the native passkey APIs on each platform
iOS
Use Apple’s AuthenticationServices framework:
ASAuthorizationPlatformPublicKeyCredentialProviderASAuthorizationController
This lets users create and use passkeys with Face ID / Touch ID.
Android
Use Credential Manager:
androidx.credentialsGetCredentialRequestCreatePublicKeyCredentialRequestGetPublicKeyCredentialOption
This is the modern Android API for passkeys.
3) Make the relying party ID consistent
Your passkeys must be bound to a domain, called the RP ID.
Example:
example.com
Rules:
- Use the same RP ID across iOS, Android, and web
- It must match a real domain you control
- Use HTTPS in production
If you want passkeys to work across your web app and mobile apps, this shared RP ID is important.
4) Support synced passkeys
For cross-device login, users should be able to sync passkeys through:
- iCloud Keychain on Apple devices
- Google Password Manager on Android
- Cross-device passkey providers, depending on OS support
This gives a better UX than device-bound credentials.
5) Use a QR/code or nearby device flow if needed
If the passkey is on another device, the user may be prompted to:
- scan a QR code
- approve on a nearby phone
- use Bluetooth proximity
This is normal for cross-device passkey authentication.
6) Handle account linking carefully
Passkeys authenticate a user, but you still need to map the credential to your internal account.
Best practice:
- identify user by email/username at registration
- store passkey against that user account
- allow multiple passkeys per account
- allow recovery methods for lost access
Common pitfalls
Wrong domain / RP ID
If your web and mobile apps use different domains or RP IDs, passkeys won’t work across them.
Using old Android APIs
Use Credential Manager, not older custom WebAuthn flows if you want the best support.
Not supporting discoverable credentials
For smoother login, support resident/discoverable credentials so users can sign in without typing a username first.
No fallback recovery
Users can lose access if they lose all synced devices. Offer:
- email OTP
- backup codes
- another passkey
- account recovery flow
Recommended implementation approach
If you have:
- Web + iOS + Android, use:
- backend WebAuthn
- iOS AuthenticationServices
- Android Credential Manager
- shared RP ID
If you want fastest development:
- use a WebAuthn server library
- and a passkey provider SDK or platform API wrapper on mobile
Practical UX flow
Registration
- User signs in or creates account
- App requests registration options from server
- Platform shows Face ID / fingerprint prompt
- Server verifies attestation/result
- Save passkey credential
Login
- App requests login options from server
- Platform shows passkey chooser
- User approves with biometrics
- Server verifies assertion
- User is logged in
Short answer
To make passkey login work across iOS and Android:
- implement WebAuthn/FIDO2 on the server
- use AuthenticationServices on iOS
- use Credential Manager on Android
- use the same RP ID/domain
- support synced/discoverable passkeys
- provide a recovery path
If you want, I can also give you:
- a reference architecture,
- sample server code, or
- native iOS + Android implementation snippets.