Skip to content

@capgo/capacitor-device-integrity

Device integrity and fraud signals with Widevine, Play Integrity, App Attest, and DeviceCheck

Device integrity and fraud signals with Widevine, Play Integrity, App Attest, and DeviceCheck

Start with getCapabilities() and the other core methods listed below.

PlatformSupportNotes
iOSYesNative
AndroidYesNative
WebPartialSee getting started
  • 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.