내용으로 건너뛰기

Getting Started

GitHub

Capgo의 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는 shim과 직접 __CAPGO_KEEP_0__ plugins.CapacitorPasskey in capacitor.config.*.

  • origin: primary HTTPS relying-party origin used by the shim and direct API
  • domains: native config에 동기화하는 동안 패치하는 추가 의존 파티 호스트 이름
  • autoShim: 기본값 true 그것은 네이티브를 제어하고 cap sync 자동 구성 hook

당신에게 동기화 패치가 무엇인지 설명합니다

“당신에게 동기화 패치가 무엇인지”라는 제목의 섹션

당신이 실행할 때 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 Capgo의 내장 기능을 사용하는 @capgo/capacitor-passkey Capgo의 @capgo/capacitor-social-login Capgo의 구현 세부 정보를 사용하는 @capgo/capacitor-social-login Capgo의 @capgo/capacitor-passkey Capgo의 구현 세부 정보를 사용하는 @capgo/capacitor-passkey capgo/capacitor-native-생체인증 Capgo의 내장 기능을 사용하는 @capgo/capacitor-native-biometric, 그리고 두 단계 인증 두 단계 인증의 구현 세부 정보를 사용하는