Skip to content

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.

__CAPGO_KEEP_1__の場合、プラグインを次のコマンドを実行してインストールし、以下のプラットフォーム固有の指示に従ってください:

  1. __CAPGO_KEEP_2__をインストール

    __CAPGO_KEEP_3__画面
    bun add @capgo/capacitor-app-attest
  2. __CAPGO_KEEP_4__

    __CAPGO_KEEP_3__画面
    bunx cap sync
  3. __CAPGO_KEEP_5__の要件を設定

    • 完了 iOSのセットアップ __CAPGO_KEEP_6__機能とバックエンド検証フローのために必要です。
    • Complete Android setup for Play Integrity Standard and backend verification flow.

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

  • iOS: Apple App Attest (DeviceCheck)
  • Android: Google Play Integrity Standard API
  • No custom client-side crypto scheme
  • Normalized outputs for backend checks
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バックエンドで検証するトークン

サーバー側で検証されていないと、証明は有効ではありません。

  • クライアントのみの成功は信頼できません。
  • バックエンドから1回限りのチャレンジ/ペイロード値を要求してください。
  • 検証 tokenバックエンドのロジックでアプリのアイデンティティとリプレイ保護を検証してください。

プラットフォーム固有のバックエンドガイドを使用してください:

Getting Startedから続けてください

Getting Startedのセクション

あなたが使用している場合 Getting Started セキュリティとコンプライアンスを計画するには、 @capgo/capacitor-app-attestを使用して @capgo/capacitor-app-attestのネイティブ機能を使用する 暗号化 暗号化の実装詳細 コンプライアンス コンプライアンスの実装詳細 Capgo セキュリティ スキャナー Capgo セキュリティ スキャナーの製品ワークフロー Capgo セキュリティ 製品ワークフローにおけるCapgo セキュリティのための製品。