Pengaturan iOS
Domain yang terkait dan apple-app-site-association.
Copas prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
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.
Jendela terminal
bun add @capgo/capacitor-passkeySinkronkan proyek native
bunx cap syncTambahkan konfigurasi plugin
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;Pasang shim selama bootstrapping
import { CapacitorPasskey } from '@capgo/capacitor-passkey';
await CapacitorPasskey.autoShimWebAuthn();Tetapkan aliran WebAuthn normal Anda
const registration = await navigator.credentials.create({ publicKey: registrationOptions,});
const authentication = await navigator.credentials.get({ publicKey: requestOptions,});Konfigurasi dibaca dari plugins.CapacitorPasskey dalam capacitor.config.*.
origin: asal HTTPS berdasarkan pihak ketiga yang digunakan oleh shim dan APIdomains: nama host pihak ketiga tambahan untuk memperbaiki konfigurasi native selama sinkronisasiautoShim: default ke true dan mengontrol hook konfigurasi native otomatis cap sync Hook konfigurasi native otomatisSaat Anda menjalankan bunx cap sync, plugin ini memperbarui proyek host native yang dihasilkan:
asset_statements metadata dan sumber daya yang dihasilkan yang digunakan oleh manifestTidak ada hook yang memublikasikan file kepercayaan situs web Anda. Anda masih perlu menyiapkan:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.json