メインコンテンツにスキップ
@capgo/capacitor-app-attest 認証 & セキュリティ オープンソース

アプリ証明 Capacitor プラグイン

Capacitor プラグインによるクロスプラットフォームデバイスの証明書の取得に使用されるApple App AttestとGoogle Play Integrity Standard

インストール

bun add @capgo/capacitor-app-attest bunx cap sync
npm、pnpm、またはyarn
  • npm install @capgo/capacitor-app-attest
  • pnpm add @capgo/capacitor-app-attest
  • yarn add @capgo/capacitor-app-attest

ガイド

How to use App Attest in Capacitor

デバイスでテスト

Download the Capgo app, then scan the QR code.

App Attest プラグインのプレビュー QR code

@capgo/capacitor-app-attestを使用

Capacitor用の統一されたクロスプラットフォームの証明プラグイン

インストール

bun add @capgo/capacitor-app-attest
bunx cap sync

このプラグインが公開するもの

  • isSupported - このデバイス上でネイティブの証明が利用可能かどうかを確認します。
  • prepare - その後で使用するために使用されるキー ハンドルを含む証明状態を準備します。
  • createAttestation - バックエンドから発行された挑戦に結びついた登録証明トークンを作成します。
  • createAssertion - リクエストペイロードに紐づいたリクエストアサーション トークンを作成します。

使用例

isSupported

このデバイスでネイティブの証明が利用可能かどうかを確認します。

import { AppAttestNative } from '@capgo/capacitor-app-attest';

const result = await AppAttestNative.isSupported();
console.log(result);

prepare

証明の状態を準備し、後続の呼び出しで使用するためのキー ハンドルを返します。

import { AppAttestNative } from '@capgo/capacitor-app-attest';

const result = await AppAttestNative.prepare();
console.log(result);

createAttestation

バックエンドから発行されたチャレンジに紐づいた登録証明トークンを作成します。

import { AppAttestNative } from '@capgo/capacitor-app-attest';

const result = await AppAttestNative.createAttestation({
  keyId: 'key-id-123',
  challenge: 'challenge',
});
// The result holds sensitive values: use it without logging it.

createAssertion

リクエストペイロードに紐づいたリクエストアサーション トークンを作成します。

import { AppAttestNative } from '@capgo/capacitor-app-attest';

const result = await AppAttestNative.createAssertion({
  keyId: 'key-id-123',
  payload: 'payload',
});
// The result holds sensitive values: use it without logging it.

フル リファレンス

「@capgo/capacitor-app-attest」を使用している場合

あなたは Using @capgo/capacitor-app-attest セキュリティとコンプライアンスの計画に役立つため、Capacitor-app-attestと接続 @capgo/capacitor-app-attest @capgo/capacitorアプリ証明 スタートガイド Getting Startedの実装詳細 Encryption Encryptionの実装詳細 Compliance Complianceの実装詳細 Capgo セキュリティ スキャナー Capacitor-App-Attestの製品ワークフローにおけるCapgo セキュリティスキャナー。

FAQ

アプリ証明プラグインFAQ

Capacitor App Attest プラグインを Capacitor アプリにインストールするにはどうすればよいですか。

Run "bun add @capgo/capacitor-app-attest" (or "npm install @capgo/capacitor-app-attest"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-app-attest" in your app code.

Does @capgo/capacitor-app-attest work with React, Vue and Angular?

Yes. App Attest is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-app-attest support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-app-attest free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-app-attest/ and the package is free to install from npm. Bug reports and pull requests are welcome.

アップデート code が App Attest を使用している場合、App Store のレビューなしでアップデートできますか。

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

アプリ アテストの変更をアプリレビューの待たずに配信する

Capgo

Capgo