iOS の設定
__CAPGO_KEEP_0__ と関連付けられたドメイン apple-app-site-association.
インストール手順とこのプラグインの完全なマークダウンガイドを含むセットアップ用の質問をコピーする
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.
パッケージをインストール
bun add @capgo/capacitor-passkeyネイティブプロジェクトを同期
bunx cap syncプラグイン設定を追加する
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;起動時に shim をインストールする
import { CapacitorPasskey } from '@capgo/capacitor-passkey';
await CapacitorPasskey.autoShimWebAuthn();通常の WebAuthn フローを維持する
const registration = await navigator.credentials.create({ publicKey: registrationOptions,});
const authentication = await navigator.credentials.get({ publicKey: requestOptions,});__CAPGO_KEEP_0__ から設定を読み込む plugins.CapacitorPasskey 、 capacitor.config.*.
origin: primary HTTPS relying-party origin used by the shim and direct APIdomains: shim に追加する extra 依存先のホスト名autoShim: __CAPGO_KEEP_0__にデフォルト true と、ネイティブの cap sync 自動構成のハックあなたが実行するとき bunx cap sync, プラグインは生成されたネイティブホストプロジェクトを更新します:
asset_statements メタデータと生成されたリソースがマニフェストを使用ハックはあなたのウェブサイトの信頼ファイルを公開するのをあなたのために行いません。まだあなたはホストする必要があります:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.json