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.
AI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-passkey` plugin in my project.Manual Setup を使用する場合は、以下のコマンドを実行してください。以下のプラットフォーム固有の指示に従ってください。
パッケージをインストール
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 in capacitor.config.*.
origin: primary HTTPS relying-party origin used by the shim and direct APIdomains: プラグインの主 HTTPS の依存関係のオリジンに加える補助的な依存関係のホスト名autoShim: 初期値は true と、ネイティブの cap sync 自動設定のハックあなたが実行するとき bunx cap sync、プラグインは生成されたネイティブホストプロジェクトを更新します:
asset_statements メタデータと生成されたリソースがマニフェストによって使用されるこのフックはあなたのウェブサイトの信頼ファイルを公開するのをあなたの代わりに行わない。まだあなたはホストする必要があります:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.jsoniOSの設定
関連ドメインと apple-app-site-association.
Androidの設定
デジタルアセットリンクと assetlinks.json.
バックエンドの注記
オリジン検証とAndroidの注意点。
あなたが 「Getting Started」を使用して 認証とアカウントフローの計画を行う場合、 「Using @capgo/capacitor-passkey」を使用して 「Using @capgo/capacitor-passkey」にnative capabilityを接続する 「@capgo/capacitor-social-login」を使用する for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric, and Capacitor-2要素認証の実装詳細のために 編集