iOSのセットアップ
関連するドメインと 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,});設定は 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 nativeアプリの設定を制御します。「あなたのサイトのパッチをsyncする」 bunx cap syncプラグインを実行すると、生成されたネイティブホストプロジェクトが更新されます:
asset_statements manifestで使用される生成されたリソースとメタデータhookはあなたのサイトの信頼情報を公開しません。まだホストする必要があります:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.jsoniOSのセットアップ
関連するドメインと apple-app-site-association.
Androidのセットアップ
デジタルアセットリンクと assetlinks.json.
バックエンドの注記
オリジン検証とAndroidの注意点。
Capgoを使用している場合 Getting Started を使用して認証とアカウントフローの計画を行い、接続する @capgo/capacitor-passkey native capability in @capgo/capacitor-passkey @capgo/capacitor-social-login implementation detail in @capgo/capacitor-social-login @capgo/capacitor-passkey implementation detail in @capgo/capacitor-passkey @capgo/capacitor-native-biometric implementation detail in @capgo/capacitor-native-biometric Two-factor authentication implementation detail in Two-factor authentication