iOS-Einrichtung
Zugehörigkeitsberechtigungen für Domänen und apple-app-site-association.
Eine Einrichtungsanleitung mit den Installationsanweisungen und der vollständigen Markdown-Guideline für diesen Plugin kopieren.
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.
You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsZur Zwischenablage kopieren
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-passkey` plugin in my project.Wenn Sie die manuelle Einrichtung bevorzugen, installieren Sie das Plugin, indem Sie die folgenden Befehle ausführen und die unten angegebenen plattform-spezifischen Anweisungen befolgen:
Installieren Sie das Paket
bun add @capgo/capacitor-passkeySynchronisieren Sie native Projekte
bunx cap syncFügen Sie die Plugin-Konfiguration hinzu
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;Installieren Sie den Shim während des Bootstraps
import { CapacitorPasskey } from '@capgo/capacitor-passkey';
await CapacitorPasskey.autoShimWebAuthn();Halten Sie Ihren normalen WebAuthn-Flow bei
const registration = await navigator.credentials.create({ publicKey: registrationOptions,});
const authentication = await navigator.credentials.get({ publicKey: requestOptions,});Die Konfiguration wird aus plugins.CapacitorPasskey in capacitor.config.*.
origin: primäre HTTPS-Vertrauenspartei-Quelle, die vom Shim und dem direkten API verwendet wirddomains: zusätzliche Vertrauenspartei-Hostnamen, die in die native Konfiguration während der Synchronisierung eingepflegt werdenautoShim: standardmäßig true und steuert die native cap sync Automatisierung des KonfigurationshakensWhen Sie das Plugin ausführen, bunx cap syncdie Plugin aktualisiert das generierte native Host-Projekt:
asset_statements Metadaten und die generierte Ressource, die vom Manifest verwendet wirdDer Hook veröffentlicht Ihre Website-Vertrauensdateien nicht für Sie. Sie müssen sie noch selbst hosten:
https://your-domain/.well-known/apple-app-site-associationhttps://your-domain/.well-known/assetlinks.jsoniOS-Einrichtung
Zugehörigkeitsberechtigungen für Domänen und apple-app-site-association.
Android-Einrichtung
Digitale Asset-Links und assetlinks.json.
Hintergrundinformationen
Validierung der Ursprungsadresse und Hinweise zu Android.
Wenn Sie Getting Started zur Planung der Authentifizierung und der Kontoflows verwenden, verbinden Sie es mit Mit @capgo/capacitor-passkey für die native Fähigkeit in Mit @capgo/capacitor-passkey, @capgo/capacitor-social-login für die Implementierungsdetails in @capgo/capacitor-social-login, @capgo/capacitor-passkey für die Implementierungsdetails in @capgo/capacitor-Passkey, @capgo/capacitor-native-biometrische für die Implementierungsdetails in @capgo/capacitor-native-biometrische, und Zwei-Faktor-Authentifizierung für die Implementierungsdetails in Zwei-Faktor-Authentifizierung.