내용으로 건너뛰기

Getting Started

GitHub

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을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:

  1. 패키지 설치

    터미널 창
    bun add @capgo/capacitor-passkey
  2. 원시 프로젝트 동기화

    터미널 창
    bunx cap sync
  3. 플러그인 설정 추가

    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;
  4. 설치하는 shim

    import { CapacitorPasskey } from '@capgo/capacitor-passkey';
    await CapacitorPasskey.autoShimWebAuthn();
  5. 정상적인 WebAuthn 흐름을 유지하세요

    const registration = await navigator.credentials.create({
    publicKey: registrationOptions,
    });
    const authentication = await navigator.credentials.get({
    publicKey: requestOptions,
    });

플러그인 구성이 하는 일

플러그인 구성이 하는 일

config는 plugins.CapacitorPasskey in capacitor.config.*.

  • origin: primary HTTPS relying-party origin used by the shim and direct API
  • domains: 플러그인 구성에서 native config에 동기화하는 동안 패치할 추가 의존성 호스트 이름
  • autoShim: 기본값은 true 그리고 native config를 제어합니다 cap sync 자동 구성 Hook

당신을 위한 Sync 패치

당신을 위한 Sync 패치

당신이 실행할 때 bunx cap sync, 플러그인이 생성된 네이티브 호스트 프로젝트를 업데이트합니다:

  • iOS: 필요할 때 Xcode 권한과 관련된 도메인 권한
  • Android: asset_statements 메타데이터와 생성된 리소스 사용하는 매니페스트

Hook은 당신의 웹사이트 신뢰 파일을 공개하지 않습니다. 당신은 여전히 호스팅해야 합니다:

  • https://your-domain/.well-known/apple-app-site-association
  • https://your-domain/.well-known/assetlinks.json

플랫폼 가이드

플랫폼 가이드

Getting Started에서 계속하기

Getting Started에서 계속하기

이러한 기능을 사용하는 경우 Getting Started 인증 및 계정 흐름을 계획하고 연결하려면 Using @capgo/capacitor-passkey Using @capgo/capacitor-passkey @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 두 단계 인증 두 단계 인증 구현 세부 사항