Skip to content

@capgo/capacitor-passkey

Keep your browser-style WebAuthn code in a Capacitor app while the plugin handles native passkey calls and native host patching.

Browser-style API

Keep navigator.credentials.create() and navigator.credentials.get() in your app instead of rewriting your passkey flow around a custom API.

Minimal app changes

Add plugin config once, call CapacitorPasskey.autoShimWebAuthn() during bootstrap, and keep the rest of your WebAuthn code close to the browser implementation.

Build-time native wiring

The plugin patches the generated iOS and Android host projects during sync so you do not need to keep hand-editing those files.

  • shimWebAuthn(options?) installs the browser-style shim immediately, with an optional HTTPS origin override.
  • getConfiguration() reads the resolved runtime config from plugins.CapacitorPasskey.
  • autoShimWebAuthn(options?) reads that config and installs the shim in one step during app bootstrap.
  • createCredential(options) and getCredential(options) call the native passkey APIs directly with JSON-safe WebAuthn payloads.
  • isSupported() reports runtime availability and getPluginVersion() returns the native implementation version marker.

If you are using @capgo/capacitor-passkey 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-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, Two-factor authentication for the implementation detail in Two-factor authentication, and SSO (Enterprise) for the implementation detail in SSO (Enterprise).