Getting Started
このプラグインのインストール手順と完全なマークダウンガイドを含むセットアップ用の質問をコピーしてください。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-verisoul`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/verisoul/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
インストールAIアシストのセットアップを使用してプラグインをインストールすることができます。次のコマンドを使用して、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-verisoul` plugin in my project.手動セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
npm install @capgo/capacitor-verisoulnpx cap syncVerisoulを設定
Verisoulの設定Call configure() アプリ起動時、1度だけ呼び出してください。テストと本番トラフィックの両方で使用します。 sandbox for testing and prod for production traffic.
import { Verisoul } from '@capgo/capacitor-verisoul';
await Verisoul.configure({ environment: 'prod', projectId: 'YOUR_PROJECT_ID',});セッションIDを取得
Section titled “Get a session ID”Verisoulが必要なネイティブシグナルを収集した後、セッションIDを取得し、バックエンドに送信します。バックエンドは、リスク評価のためにVerisoulのサーバーサイドAPIを呼び出してください。
const { sessionId } = await Verisoul.getSessionId();
await fetch('/api/risk/verisoul', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ sessionId }),});アカウント変更時にはリセット
Section titled “Reset on account changes”Call reinitialize() ユーザー コンテキストが変更された場合、例えばログアウト後に別のアカウントでログインした場合。
await Verisoul.reinitialize();Androidタッチイベント
「Androidタッチイベント」セクションAndroidで、タッチイベントを転送して、Verisoulタッチパターン収集が必要なアプリに必要なイベントを転送します。
await Verisoul.recordTouchEvent({ x: 120, y: 240, action: 'down',});プラットフォーム設定
「プラットフォーム設定」セクションGetting Startedから続けてください
Getting Startedから続けてくださいというセクションCapgoを使用している場合 Getting Started Verisoulセッションを統合するには、Capgoと接続する必要があります。 @capgo/capacitor-verisoul APIの概要については iOSのセットアップ App Attestの注釈について Androidのセットアップ Gradleのセットアップ Capgoを使用している場合、@capgo/capacitor-verisoul __CAPGO_KEEP_0__