내용으로 건너뛰기

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,
    });

플러그인 설정이 무엇을 하는가

플러그인 설정이 무엇을 하는가란 제목

설정은 plugins.CapacitorPasskey 에서 capacitor.config.*.

  • origin기본 HTTPS 의존성 원본을 사용하는 shim 및 직접 API
  • domains, 추가 의존성 호스트 이름을 네이티브 설정에 동기화하는 동안 패치하는 것
  • autoShim, 기본값이 true 이고 네이티브 cap sync 자동 구성 Hook

__CAPGO_KEEP_0__에서 동기화 패치하는 것

플러그인 설정이 무엇을 하는가란 제목

당신이 실행할 때 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 인증 및 계정 흐름을 계획하고 연결하려면 @capgo/capacitor-passkey @capgo/capacitor-passkey @capgo/capacitor-social-login @capgo/capacitor-social-login @capgo/capacitor-passkey capgo/capacitor-passkey 구현 세부 사항에 대해 capgo/capacitor-native-biometric capgo/capacitor-native-biometric 구현 세부 사항에 대해, 그리고 두 단계 인증 __CAPGO_KEEP_0__/__CAPGO_KEEP_1__-native-biometric 구현 세부 사항에 대해 두 단계 인증.