Skip to content

About

Capacitor plugin for Verisoul fraud prevention sessions.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

@capgo/capacitor-verisoul

Detect fake accounts and fraud in your Capacitor app with Verisoul's native SDKs, and send a session ID to your backend for risk checks.

Capgo - Instant updates for Capacitor

Capgo: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.

14-day unlimited free trial. No credit card required

Missing a feature? We'll build the plugin for you 💪

@capgo/capacitor-verisoul for Capacitor apps

Key features

  • Setup: configure() with your Verisoul environment and project ID.
  • Sessions: getSessionId() returns the session to verify on your server.
  • Fresh start: reinitialize() resets signal collection and starts a new session.
  • Touch signals: recordTouchEvent() forwards touch events for behavioral analysis on Android. It is a no-op on iOS.
  • Platforms: iOS and Android. Uses the Verisoul iOS and Android SDKs. Not available on web.

Installation

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-verisoul` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

npm install @capgo/capacitor-verisoul
npx cap sync

iOS setup

Verisoul recommends enabling App Attest for stronger iOS device checks. Add the capability in Xcode and include the entitlement that matches your environment:

<key>com.apple.developer.devicecheck.appattest-environment</key>
<string>production</string>

Use development for test builds.

Android setup

The plugin adds the Verisoul Maven repository and required network permissions. If your app build cannot resolve ai.verisoul:android, add this repository to your app root Gradle repositories:

maven { url = uri("https://us-central1-maven.pkg.dev/verisoul/android") }

Usage

import { Verisoul } from '@capgo/capacitor-verisoul';

await Verisoul.configure({
  environment: 'prod',
  projectId: 'YOUR_PROJECT_ID',
});

const { sessionId } = await Verisoul.getSessionId();

await Verisoul.reinitialize();

On Android, forward touch events when you need Verisoul touch-signal collection:

await Verisoul.recordTouchEvent({
  x: 120,
  y: 240,
  action: 'down',
});

API

configure(...)

configure(options: ConfigureOptions) => Promise<void>

Initialize Verisoul. Call this once, early in app startup.

Param Type
options ConfigureOptions

getSessionId()

getSessionId() => Promise<SessionIdResult>

Return the current Verisoul session identifier.

The value may take a few seconds to become available after configure().

Returns: Promise<SessionIdResult>


reinitialize()

reinitialize() => Promise<void>

Reset Verisoul signal collection and create a fresh session.

Use this when account context changes, for example after logout/login.


recordTouchEvent(...)

recordTouchEvent(options: RecordTouchEventOptions) => Promise<void>

Forward a touch event to Verisoul.

Android uses this for bot-detection touch signals. iOS resolves without work because the iOS SDK does not expose a matching public API.

Param Type
options RecordTouchEventOptions

Interfaces

ConfigureOptions

Prop Type Description
environment VerisoulEnvironment Verisoul project environment. Use prod or production for production traffic and sandbox for testing.
projectId string Verisoul project identifier.

SessionIdResult

Prop Type Description
sessionId string Verisoul session identifier. Send this value to your backend before calling Verisoul's server-side assessment APIs.

RecordTouchEventOptions

Prop Type Description
x number Touch X coordinate in view pixels.
y number Touch Y coordinate in view pixels.
action VerisoulTouchAction Touch action. Android forwards this to the native Verisoul SDK. iOS currently ignores this method because the Verisoul iOS SDK does not expose the same public touch-event hook.

Type Aliases

VerisoulEnvironment

'dev' | 'sandbox' | 'staging' | 'prod' | 'production'

VerisoulTouchAction

'down' | 'up' | 'move' | 0 | 1 | 2

About

Capacitor plugin for Verisoul fraud prevention sessions.

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages