Implement passkey registration and authentication using Android Credential Manager API

domain: developer.android.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Add the androidx.credentials:credentials dependency (and credentials-play-services-auth for Google Play Services compatibility) to your Android project
  2. Fetch registration options from your server's /webauthn/register/begin endpoint, then call credentialManager.createCredential() with a CreatePublicKeyCredentialRequest built from the options JSON
  3. Parse the CreatePublicKeyCredentialResponse JSON and POST the attestation response to your server's /webauthn/register/finish endpoint for verification
  4. For authentication, fetch challenge options from /webauthn/login/begin, then call credentialManager.getCredential() with a GetPublicKeyCredentialOption; handle GetCredentialException.TYPE_NO_CREDENTIAL for the case where no passkey exists
  5. Parse the GetCredentialResponse, extract the PublicKeyCredential, and POST the assertion response to your server for verification
  6. Handle the credential provider selection UX: Credential Manager aggregates from Google Password Manager and any installed third-party providers (1Password, Samsung Pass etc.) — the system bottom sheet handles selection automatically

Known gotchas

Related routes

Verify a mobile driver's license using Android's Credential Manager DigitalCredential Verifier API over OpenID4VP per ISO/IEC 18013-5
developer.android.com · 5 steps · unrated
Implement Stytch passkeys registration and authentication in a web application
stytch.com · 5 steps · unrated
Provision Android enterprise enrollment token and generate QR code via Android Management API
developers.google.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans