跳过内容

@capgo/capacitor-passkey

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

浏览器样式 API

保持 navigator.credentials.create()navigator.credentials.get() 在您的应用程序中保留而不是重写自定义 API 的 passkey 流程。

最小化应用程序更改

添加插件配置一次,调用 CapacitorPasskey.autoShimWebAuthn() 在引导期间,保持您的 WebAuthn code 与浏览器实现非常接近。

构建时本机编程

插件在同步期间修补生成的 iOS 和 Android 主机项目,因此您不需要手动编辑这些文件。

  • shimWebAuthn(options?) 立即安装浏览器样式 shim,支持可选的 HTTPS 源站覆盖
  • getConfiguration()plugins.CapacitorPasskey.
  • autoShimWebAuthn(options?) 读取并安装 shim 的配置文件,仅在应用启动时进行一次步骤
  • createCredential(options)getCredential(options) 直接调用本机 passkey API,使用 JSON 安全的 WebAuthn payload
  • isSupported() 报告运行时可用性和 getPluginVersion() 返回原生实现版本标记。

从 @capgo/capacitor-passkey 中继续

标题:从 @capgo/capacitor-passkey 中继续

如果您正在使用 @capgo/capacitor-passkey 来规划身份验证和帐户流程,连接它到 使用 @capgo/capacitor-passkey for the native capability in Using @capgo/capacitor-passkey, 使用 @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-social-login 为 @capgo/capacitor-native-biometric 的实现细节 双因素认证 为双因素认证和 SSO (企业) 为 SSO (企业) 的实现细节