Why Domain Association?
Passkeys are bound to specific domains for security. Mobile apps must prove ownership of a domain to use passkeys registered to that domain. This requires:- An
rpId(domain name) in your SDK config - Verification files hosted on that domain
- App configuration linking to that domain
Understanding rpId
TherpId (Relying Party ID) is the domain where passkeys are registered:
- Must be a valid domain (not IP address or localhost)
- Must host verification files at
/.well-known/ - App must be configured with associated domains
iOS Configuration
1. Host apple-app-site-association
Create a file athttps://app.yourcompany.com/.well-known/apple-app-site-association:
TEAMIDwith your Apple Team ID (find in Apple Developer portal)com.yourcompany.yourappwith your bundle identifier
The file must be served:
- Without
.jsonextension - With
Content-Type: application/json - Over HTTPS
2. Configure Expo/Xcode
Inapp.json:
- Select your target
- Go to “Signing & Capabilities”
- Add “Associated Domains”
- Add
webcredentials:app.yourcompany.com
Android Configuration
1. Host assetlinks.json
Create a file athttps://app.yourcompany.com/.well-known/assetlinks.json:
2. Get SHA-256 Fingerprint
For debug builds:3. Configure Package Name
Inapp.json:
Minimal Hosting Setup
If you don’t have a web presence, you can use static hosting:Using Vercel
- Create a new project
- Add files to
public/.well-known/ - Deploy
Using GitHub Pages
- Create repository
- Add
.well-known/directory with files - Enable GitHub Pages
Using Cloudflare Pages
- Create project
- Add files to output directory
- Deploy
Verification
iOS Verification
After building, check device logs for:Android Verification
Use Google’s tool:Troubleshooting
Passkey Registration Fails
- Verify AASA/assetlinks files are accessible
- Check Content-Type headers
- Ensure HTTPS is used
- Rebuild app after changing associated domains
”No Matching Credentials”
- Domain mismatch between
rpIdand hosted files - Bundle ID / package name mismatch
- Wrong certificate fingerprint (Android)
Development Tips
- Use a real domain even for development
- Consider a subdomain like
dev.yourcompany.com - iOS caches AASA files; restart device or wait 24h for updates

