Prerequisites
- SDK initialized
- Domain you control (for
.well-knownfiles) - App package name and SHA-256 certificate fingerprint
- Android SDK 28+
App Configuration
There are a few steps to configure passkey support. If you have already set up an associated domain for your application, you can skip to Managing Passkeys.Set Up an Associated Domain
On your webserver, set up this route:.well-known/assetlinks.json
com.example.yourappwith your app’s package name- The SHA-256 fingerprint with your app’s signing certificate fingerprint
Get Your SHA-256 Certificate Fingerprint
To get your app’s SHA-256 certificate fingerprint:SHA256 line in the output and copy the fingerprint.
You can validate your asset links configuration using the Google Digital Asset Links Tool. This tool tests your domain against Android’s requirements and helps ensure your passkey setup is properly configured.
SDK Configuration
Configure theappOrigin in your SDK initialization to associate passkeys with your domain:
MainActivity.kt
Managing Passkeys
Now that your application has correctly associated your domain, you can register and authenticate using passkeys.Sign In with Passkey
Use passkeys as the primary authentication method:Register passkey
Register a new passkey for the authenticated user:Get user passkeys
Retrieve all passkeys registered for the current user:Authenticate with passkey for MFA
Use a passkey to authenticate for MFA purposes:Delete passkey
Remove a passkey from the user’s account:Complete passkey management example
Here’s a complete example of passkey management in a ViewModel:Passkey UI example
Display passkeys in a Compose UI:Using Passkeys for MFA
Passkeys can also be used as a second factor for multi-factor authentication. Once you’ve completed the configuration above, see the MFA Guide for details on using passkeys as a 2FA method.Benefits of Passkeys
- Passwordless: No need to remember or type passwords
- Secure: Uses device biometrics or PIN
- Phishing-resistant: Cannot be stolen or intercepted
- Fast: Quick authentication with fingerprint or face recognition
- Cross-platform: Works across devices with Google Password Manager sync
Troubleshooting
Common Issues
Passkey registration fails- Verify your asset links configuration at
https://yourdomain.com/.well-known/assetlinks.json - Check that the JSON contains your correct package name and SHA-256 fingerprint
- Ensure you’re using the correct signing certificate fingerprint (debug vs release)
- Validate your asset links using the Google Digital Asset Links Tool
- The user may not have any passkeys registered yet
- Ensure the user is authenticated before attempting passkey sign-in
- Check that passkeys are supported on the device (Android 9.0+)
- Verify
appOriginin SDK configuration matches your asset links domain exactly - Check that both use the same protocol (https://)
- Ensure the domain is accessible and the asset links file is served correctly
What’s Next
Now that you have passkeys configured:- MFA Guide - Use passkeys as a second factor for multi-factor authentication
- Authentication - Learn about other authentication methods
- Session Management - Manage authenticated sessions