Configurazione iOS
Domini associati e apple-app-site-association.
Copia un prompt di configurazione con i passaggi di installazione e la guida markdown completa per questo plugin.
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.
Installa il pacchetto
bun add @capgo/capacitor-passkeySincronizza progetti nativi
bunx cap syncAggiungi la configurazione del 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;Installa il shim durante l'avvio
import { CapacitorPasskey } from '@capgo/capacitor-passkey';
await CapacitorPasskey.autoShimWebAuthn();Mantieni il tuo flusso WebAuthn normale
const registration = await navigator.credentials.create({ publicKey: registrationOptions,});
const authentication = await navigator.credentials.get({ publicKey: requestOptions,});La configurazione viene letta da plugins.CapacitorPasskey in capacitor.config.*.
origin: origine HTTPS di terze parti primaria utilizzata dal shim e diretto APIdomains: host di terze parti aggiuntivi da aggiungere alla configurazione nativa durante la sincronizzazioneautoShim: predefinito true e controlla l'hook di configurazione nativa cap sync Auto-configurazioneQuando esegui bunx cap syncil plugin aggiorna il progetto host nativo generato:
asset_statements metadati e il risorsa generata utilizzata dal manifestoL'hook non pubblica i file di trust del tuo sito web per te. Hai ancora bisogno di ospitare:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.json