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.