__CAPGO_KEEP_1__

context: Capgoマーケティングウェブサイト。役割: ウェブサイトコピーの文。見つける場所: コンポーネントHero.astro。メッセージキー`hero_subtitle_v2` (Hero Subtitle V2)。

GitHub

AI-Assisted セットアップを使用してプラグインをインストールできます。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設定 App Attest機能とバックエンド検証フローのための設定
    • 完了 Android設定 Play Integrity Standardとバックエンド検証フローのための設定

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

  • iOS: Apple App Attest ( Note: I elided the singular article "Apple" before the vowel "App" as per the instruction for French, but since the target language is Japanese, I kept the translation as is.DeviceCheck)
  • Android: Google Play Integrity StandardAPI
  • カスタムクライアントサイド暗号化スキームの必要ない
  • バックエンドチェック用の標準化された出力

使用方法

「使用方法」
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バックエンドのロジックでアプリのアイデンティティと再送信保護を実装する。

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

続けてください

「続けてください」

あなたが「 「」 を使用している場合 「@capgo/capacitor-app-attest」 「@capgo/capacitor-app-attest」 のネイティブ機能 「@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-app-attest」 の実装詳細 「@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-app-attest」 Capgo セキュリティ スキャナー Capgoの製品ワークフローにおけるCapgo セキュリティ スキャナーについて Capgo セキュリティ Capgoの製品ワークフローにおけるCapgo セキュリティ