__CAPGO_KEEP_0__

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-app-attest` plugin in my project.

만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:

  1. 패키지 설치

    터미널 창
    bun add @capgo/capacitor-app-attest
  2. 자연어 프로젝트 동기화

    터미널 창
    bunx cap sync
  3. 플랫폼 요구 사항 구성

    • 완료 iOS 설정 앱 신뢰성 기능과 백엔드 검증 흐름을 위해.
    • 완료 Android 설정 Play Integrity Standard과 백엔드 검증 흐름을 위해.

This plugin provides one cross-platform API while keeping native platform security:

  • iOS: Apple App Attest (DeviceCheck)
  • Android: Google Play Integrity Standard API
  • 사용자 정의 클라이언트 측 암호화 스키마가 필요하지 않습니다.
  • 백엔드 검증을 위한 정규화된 출력
import { AppAttest } from '@capgo/capacitor-app-attest';
const support = await AppAttest.isSupported();
if (!support.isSupported) {
throw new Error(`Attestation not supported on ${support.platform}`);
}
const prepared = await AppAttest.prepare();
const registration = await AppAttest.createAttestation({
keyId: prepared.keyId,
challenge: 'backend-one-time-registration-challenge',
});
const assertion = await AppAttest.createAssertion({
keyId: prepared.keyId,
payload: 'backend-one-time-request-payload',
});
console.log(registration.platform, registration.format, registration.token);
console.log(assertion.platform, assertion.format, assertion.token);

통합 응답 형태

통합 응답 형태 섹션

createAttestation() 그리고 createAssertion() iOS와 Android에서 동일한 키 필드를 반환하십시오:

필드타입설명
platform'ios' | 'android' | 'web'토큰을 생성한 네이티브 플랫폼
formatAttestationFormatapple-app-attest 또는 google-play-integrity-standard
keyIdstring__CAPGO_KEEP_0__
tokenstring__CAPGO_KEEP_1__

__CAPGO_KEEP_2__

__CAPGO_KEEP_3__

서버 측에서만 인증을 확인할 때만 attestation이 유용합니다.

  • 클라이언트만 성공할 때는 절대 신뢰하지 마세요.
  • 백엔드에서 한번만 사용할 수 있는 challenge/payload 값을 요구하세요.
  • 인증 token__CAPGO_KEEP_4__

iOS 설정과 백엔드 검증

Getting Started에서 계속 진행하세요

Getting Started에서 계속 진행하는 섹션

Capgo를 사용 중이라면 Getting Started 보안 및 규정 준수 계획을 위해 연결하세요. Capgo를 사용하여 @capgo/capacitor-app-attest를 사용하는 경우 Capgo를 사용하여 @capgo/capacitor-app-attest의 네이티브 기능을 사용하는 경우 암호화 암호화 구현 세부 정보 규정 준수 규정 준수 구현 세부 정보 Capgo 보안 스캐너 Capgo 보안 스캐너의 제품 워크플로우에 대해 Capgo 보안 Capgo 보안의 제품 워크플로우에 대해