npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@capgo/capacitor-persona

v8.2.5

Published

Capacitor plugin for launching Persona Inquiry flows on iOS and Android.

Readme

@capgo/capacitor-persona

🤖 Building with an AI coding agent? Install Capgo skills so Claude Code, Codex, Cursor, Copilot, or Gemini CLI know how to install and use @capgo/capacitor-persona in your Capacitor app: npx skills add Cap-go/capgo-skills. Then ask your agent: "Add @capgo/capacitor-persona to my Capacitor app and wire it up." Agent setup guides · Hosted MCP

Launch Persona Inquiry flows from Capacitor apps on iOS and Android. Use template IDs or resume existing inquiries, prefill fields, and listen for completion, cancel, and error events in JavaScript.

Built and maintained with AI

We build, improve and fix our plugins with heavy use of AI, so issues usually get fixed in under a day and pull requests get feedback the same day. A human still reviews, tests and merges 50+ pull requests daily.

  • Most plugin issues get a fix pull request the same day, often within a couple of hours, and are usually resolved in one to two days.
  • Every pull request goes through our AI review system, usually within minutes.
  • Our AI pre-checks tests, code review, conventions and security, then a human reviews, tests and merges.
  • A human, Martin, reviews, tests and merges 50+ pull requests every day.
  • In the last 90 days, 95% of plugin issues were resolved.

Learn more about how we build with AI

What it covers

  • Start a Persona Inquiry from a template ID, template version, or existing inquiry ID
  • Prefill inquiry fields and set sandbox or production environment
  • Receive inquiryComplete, inquiryCanceled, and inquiryError events in the WebView layer
  • Native Persona SDK integration on iOS (PersonaInquirySDK2 3.x) and Android (com.withpersona.sdk2:inquiry 2.x)

Install

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-persona` 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-persona
npx cap sync

Docs: capgo.app/docs/plugins/persona/

Usage

import { Persona } from '@capgo/capacitor-persona';

await Persona.addListener('inquiryComplete', (result) => {
  console.log('Persona complete', result.inquiryId, result.status, result.fields);
});

await Persona.addListener('inquiryCanceled', (result) => {
  console.log('Persona canceled', result.inquiryId, result.sessionToken);
});

await Persona.addListener('inquiryError', (result) => {
  console.error('Persona error', result.error, result.errorCode);
});

await Persona.startInquiry({
  templateId: 'itmpl_EXAMPLE',
  environment: 'sandbox',
  referenceId: 'user_123',
  fields: {
    name_first: 'Alex',
    age: 29,
    is_verified_user: true,
  },
});

Use Persona webhooks on your backend for authoritative verification status. SDK callbacks are best for UX, not compliance decisions.

iOS setup

  1. Run npx cap sync ios.
  2. Ensure the iOS deployment target is 15.0 or newer (matches the plugin podspec and Package.swift).
  3. Build with Xcode 26.2 or newer. Persona 3.x ships as a binary XCFramework whose Swift interface is produced by a current Swift 6 toolchain; older Xcode releases are not verified.
  4. Add usage descriptions to ios/App/App/Info.plist. Persona requires camera and location strings for every template, and microphone when a template records video:
<key>NSCameraUsageDescription</key>
<string>We use the camera to verify your identity.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We use your location during identity verification.</string>
<key>NSMicrophoneUsageDescription</key>
<string>We use the microphone when a verification records video.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>We use Bluetooth during identity verification when required.</string>

Templates that use NFC additionally need NFCReaderUsageDescription, the NFC Tag Reading capability, and the ISO7816 application identifiers listed in Persona's iOS integration guide.

  1. Dependency resolution: Swift Package Manager projects (the Capacitor 8 default) resolve inquiry-ios-2 at exactly 3.11.0 through the plugin Package.swift. CocoaPods projects resolve the PersonaInquirySDK2 3.11.0 pod (Persona resumed CocoaPods publishing with 3.8.0).

Android setup

  1. Run npx cap sync android.
  2. In the app root android/build.gradle, add Persona's Maven repository so Gradle can resolve the inquiry SDK:
allprojects {
  repositories {
    google()
    mavenCentral()
    maven { url 'https://sdk.withpersona.com/android/releases' }
  }
}
  1. The plugin library targets minSdk 24 and depends on com.withpersona.sdk2:inquiry (default 2.59.1, overridable with personaInquiryVersion in Gradle). Versions 2.56.0 and newer are published to Maven Central only; the Persona Maven repository above still serves older pins.

Upgrading from 8.1.x

Plugin 8.2.0 moves iOS to Persona Inquiry SDK 3.11.0 and Android to 2.59.1. No JavaScript changes are required.

  • inquiryError events on iOS now include errorCode (and cause for misconfigured inquiries); see InquiryErrorInfo below.
  • locale now works together with templateVersion on iOS.
  • On iOS, an invalid templateVersion is now reported through inquiryError (errorCode: "misconfigured") instead of rejecting the startInquiry promise, matching templateId and Android.
  • iOS builds need Xcode 26.2 or newer.
  • Persona removed client-side theming in SDK 3; configure appearance in the Persona Dashboard Theme Editor.

API

startInquiry(...)

startInquiry(options: StartInquiryOptions) => Promise<void>

Launch a Persona Inquiry flow.

| Param | Type | | ------------- | ------------------------------------------------------------------- | | options | StartInquiryOptions |


addListener('inquiryComplete', ...)

addListener(eventName: 'inquiryComplete', listenerFunc: (info: InquiryCompleteInfo) => void) => Promise<PluginListenerHandle>

Listen for successful completion.

| Param | Type | | ------------------ | -------------------------------------------------------------------------------------- | | eventName | 'inquiryComplete' | | listenerFunc | (info: InquiryCompleteInfo) => void |

Returns: Promise<PluginListenerHandle>


addListener('inquiryCanceled', ...)

addListener(eventName: 'inquiryCanceled', listenerFunc: (info: InquiryCanceledInfo) => void) => Promise<PluginListenerHandle>

Listen for cancellation.

| Param | Type | | ------------------ | -------------------------------------------------------------------------------------- | | eventName | 'inquiryCanceled' | | listenerFunc | (info: InquiryCanceledInfo) => void |

Returns: Promise<PluginListenerHandle>


addListener('inquiryError', ...)

addListener(eventName: 'inquiryError', listenerFunc: (info: InquiryErrorInfo) => void) => Promise<PluginListenerHandle>

Listen for unrecoverable errors.

| Param | Type | | ------------------ | -------------------------------------------------------------------------------- | | eventName | 'inquiryError' | | listenerFunc | (info: InquiryErrorInfo) => void |

Returns: Promise<PluginListenerHandle>


removeAllListeners()

removeAllListeners() => Promise<void>

Remove all registered listeners for this plugin instance.


Interfaces

PluginListenerHandle

| Prop | Type | | ------------ | ----------------------------------------- | | remove | () => Promise<void> |

InquiryCompleteInfo

Payload emitted when an Inquiry is completed.

| Prop | Type | | --------------- | ----------------------------------------------------------------------------------------------------------------------- | | inquiryId | string | | status | string | | fields | Record<string, PersonaResultFieldValue> |

InquiryCanceledInfo

Payload emitted when an Inquiry is canceled.

| Prop | Type | | ------------------ | ------------------- | | inquiryId | string | | sessionToken | string |

InquiryErrorInfo

Payload emitted when an Inquiry errors.

| Prop | Type | Description | | --------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | error | string | Human-readable description from the Persona SDK. | | errorCode | string | Stable, platform-specific code. iOS (Persona SDK 3.x) emits the PersonaError case name: networking, invalidSessionToken, oneTimeLinkCodeInvalid, rateLimitExceeded, camera, gps, permissions, misconfigured, other, or unknown for cases added by a newer SDK. Android (Persona SDK 2.x) emits the SDK ErrorCode enum name, for example NetworkError, CameraPermissionError, SdkConfigurationError, SessionTokenError, RateLimitExceeded, InvalidOneTimeLinkCode, UnexpectedError. | | cause | string | Additional detail when available. On iOS this is the InquiryConfigurationError description for misconfigured errors; on Android it is the SDK cause string. |

Type Aliases

StartInquiryOptions

Input payload used to launch an Inquiry.

Provide exactly one of inquiryId, templateId, or templateVersion.

StartInquirySharedOptions & ( | { /** * Existing Inquiry ID created on your backend. / inquiryId: string; templateId?: never; templateVersion?: never; } | { /* * Inquiry template ID from Persona Dashboard (recommended). / templateId: string; inquiryId?: never; templateVersion?: never; } | { /* * Inquiry template version ID from Persona Dashboard. * * Validated by the Persona SDK: an invalid value is reported through * inquiryError (errorCode: "misconfigured" on iOS) rather than by * rejecting the startInquiry promise. */ templateVersion: string; inquiryId?: never; templateId?: never; } )

StartInquirySharedOptions

{ /** * Session token required when resuming an existing Inquiry. / sessionToken?: string; /* * Your internal user reference. / referenceId?: string; /* * Persona account ID. / accountId?: string; /* * Persona environment. * * @default 'production' / environment?: PersonaEnvironment; /* * Locale override, for example en, fr, es. * * Supported with inquiryId, templateId, and templateVersion on both platforms * (iOS support for templateVersion requires plugin 8.2.0 or newer). / locale?: string; /* * Optional fields pre-written into the Inquiry. */ fields?: Record<string, PersonaFieldValue>; }

PersonaEnvironment

Environment where Persona should run.

'production' | 'sandbox'

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }

PersonaFieldValue

Supported field value types for pre-writing Inquiry fields.

string | number | boolean | string[]

PersonaResultFieldValue

Serialized field value returned in Inquiry result callbacks.

string | number | boolean | string[] | null