내용으로 건너뛰기

App Attest __CAPGO_KEEP_0__ 저장소

GitHub

AI-Assisted 설치를 사용하여 플러그인을 설치할 수 있습니다. Capgo 스킬을 AI 도구에 추가하려면 다음 명령어를 사용하세요.

터미널 창
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 설정 App Attest 기능과 백엔드 검증 흐름을 위한 설정
    • 완료 Android 설정 Play Integrity Standard과 백엔드 검증 흐름을 위한 설정

이 플러그인은 한 번의 크로스 플랫폼 API를 제공하면서 native 플랫폼 보안을 유지합니다:

  • iOS: Apple 앱 attestation (인증)DeviceCheck)
  • 안드로이드: 구글 플레이 인티그리티 스탠다드 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인증을 위한 키/제공자 핸들
tokenstring서버에서 확인하는 토큰

백엔드 요구 사항

백엔드 요구 사항 섹션

서버에서만 인증이 유용합니다.

  • 클라이언트만 성공을 믿지 마세요.
  • 백엔드에서 한번만 사용하는 챌린지/페이로드 값을 요구하세요.
  • 확인 token앱 식별, 앱 ID, 및 백엔드 로직에서 재생 보호 기능을 사용하세요.

플랫폼별 백엔드 가이드를 사용하세요:

시작하기에서 계속

시작하기에서 계속

이러한 기능을 사용 중이라면 시작하기 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-앱-인증을 사용하여 @capgo/capacitor-앱-인증을 사용하여 native 기능을 사용하는 @capgo/capacitor-app-attest에 대한 Capgo 플러그인 암호화 구현 규정 준수 규정 준수 구현 __CAPGO_KEEP_0__ Capgo 보안 스캐너 Capgo 보안 스캐너의 제품 워크플로우에 대해 Capgo 보안 Capgo 보안의 제품 워크플로우에 대해