iOS setup
Associated Domains and apple-app-site-association.
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-passkey`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/passkey/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Install the package
bun add @capgo/capacitor-passkeySync native projects
bunx cap syncAdd the plugin config
import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { appId: 'app.capgo.passkey.example', appName: 'My App', webDir: 'dist', plugins: { CapacitorPasskey: { origin: 'https://signin.example.com', autoShim: true, domains: ['signin.example.com'], }, },};
export default config;Install the shim during bootstrap
import { CapacitorPasskey } from '@capgo/capacitor-passkey';
await CapacitorPasskey.autoShimWebAuthn();Keep your normal WebAuthn flow
const registration = await navigator.credentials.create({ publicKey: registrationOptions,});
const authentication = await navigator.credentials.get({ publicKey: requestOptions,});The config is read from plugins.CapacitorPasskey in capacitor.config.*.
origin: primary HTTPS relying-party origin used by the shim and direct APIdomains: extra relying-party hostnames to patch into native config during syncautoShim: defaults to true and controls the native cap sync auto-configuration hookWhen you run bunx cap sync, the plugin updates the generated native host project:
asset_statements metadata and the generated resource used by the manifestThe hook does not publish your website trust files for you. You still need to host:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.jsoniOS setup
Associated Domains and apple-app-site-association.
Android setup
Digital Asset Links and assetlinks.json.
Backend notes
Origin validation and Android caveats.
If you are using Getting Started to plan authentication and account flows, connect it with Using @capgo/capacitor-passkey for the native capability in Using @capgo/capacitor-passkey, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Two-factor authentication for the implementation detail in Two-factor authentication.