Skip to content

@capgo/capacitor-device-integrity

Native integrity signals for fraud and abuse detection in Capacitor apps.

@capgo/capacitor-device-integrity exposes native integrity capabilities for Capacitor:

  • Android: Widevine DRM fingerprint and Play Integrity Standard attestation
  • iOS: Apple App Attest and DeviceCheck
  • Web: reports unsupported capabilities (no native signals)
  • getCapabilities - Returns which integrity features are available on the current platform.
  • getWidevineFingerprint - Returns an Android Widevine-derived device fingerprint.
  • prepareAttestation - Prepares App Attest or Play Integrity state and returns a key or provider handle.
  • createAttestation - Creates a registration attestation token bound to a backend challenge.
  • createAssertion - Creates a request assertion token bound to a backend payload.
  • getDeviceCheckToken - Creates an iOS DeviceCheck token for server-side fraud lookups.
MethodDescription
getCapabilitiesReturns Widevine, App Attest, DeviceCheck, and Play Integrity support on this device.
getWidevineFingerprintAndroid only. Returns salted SHA-256 fingerprint and optional Widevine metadata.
prepareAttestationPrepares native attestation and returns keyId plus format.
createAttestationCreates a registration token for a backend-issued challenge.
createAssertionCreates an assertion token for a backend-issued payload.
getDeviceCheckTokeniOS only. Returns a base64 DeviceCheck token.

Android Play Integrity can use a global Cloud project number in capacitor.config.ts:

plugins: {
DeviceIntegrity: {
cloudProjectNumber: '123456789012',
},
},

You can also pass cloudProjectNumber to prepareAttestation, createAttestation, and createAssertion.

This reference is synced from src/definitions.ts in capacitor-device-integrity.

Keep going from @capgo/capacitor-device-integrity

Section titled “Keep going from @capgo/capacitor-device-integrity”

If you are using @capgo/capacitor-device-integrity to plan security and compliance, connect it with Using @capgo/capacitor-device-integrity for the native capability in Using @capgo/capacitor-device-integrity, Using @capgo/capacitor-app-attest for related attestation flows, @capgo/capacitor-app-attest for implementation detail, Capgo Security Scanner for the product workflow in Capgo Security Scanner, and Capgo Security for the product workflow in Capgo Security.