__CAPGO_KEEP_0__ - __CAPGO_KEEP_1__ アプリのリアルタイム更新

Getting Started

GitHub
  1. パッケージをインストール

    ターミナルウィンドウ
    bun add @capgo/capacitor-app-attest
  2. ネイティブプロジェクトを同期

    ターミナルウィンドウ
    bunx cap sync
  3. プラットフォーム要件を設定

    • 完了 iOS設定 App Attest機能とバックエンド検証フロー用
    • 完了 Android設定 Play Integrity Standardとバックエンド検証フロー用

このプラグインは、ネイティブプラットフォームのセキュリティを維持しながら、1つのクロスプラットフォームAPIを提供します。

  • iOS: Apple App Attest (DeviceCheck)
  • Android: Google Play Integrity Standard API
  • No custom client-side crypto scheme
  • バックエンドのチェック用に正規化された出力

使用方法

使用方法
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'__CAPGO_KEEP_0__
formatAttestationFormatapple-app-attest または google-play-integrity-standard
keyIdstring__CAPGO_KEEP_1__
tokenstring__CAPGO_KEEP_2__

バックエンドの要件

バックエンドの要件

サーバー側で検証する必要があるため、証明は有効です。

  • クライアントのみの成功は信頼できません。
  • バックエンドから1回限りのチャレンジ/ペイロード値を要求する必要があります。
  • バックエンドで検証する必要があります。 token, アプリケーション ID、そしてリプレイ保護をバックエンド ロジックに実装します。

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

「Getting Started」から続けてください

「Getting Started」から続けてください

あなたが「Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-app-attest」を使用している場合 セキュリティとコンプライアンスを計画するには、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-app-attestを接続してください 「Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-app-attest」で使用するネイティブ機能 「Using @capgo/capacitor-app-attest」で使用するネイティブ機能 for the native capability in Using @capgo/capacitor-app-attest, If you are using 暗号化の実装詳細について 法的要件 __CAPGO_KEEP_0__ セキュリティ スキャナー Capgo セキュリティ スキャナーの製品ワークフローについて Capgo セキュリティ Capgo セキュリティの製品ワークフローについて for the product workflow in Capgo Security.