Requirements: iOS 13.0+, Android Min SDK 21, Java 17.
npm install @socure-inc/react-native-device-riskiOS — add to your Podfile and install pods:
platform :ios, '13.0'
pod 'SocureDeviceRisk'cd ios && pod installAndroid — add the Maven repo to android/build.gradle and ensure Java 17 in android/app/build.gradle.
Initialize and get a token:
import { RnSigmaDevice, SigmaDeviceOptions }
from '@socure-inc/react-native-device-risk';
try {
const options: SigmaDeviceOptions = { omitLocationData: false };
const result = await RnSigmaDevice.initializeSDK('YOUR_SDK_KEY', options);
const diSessionToken = result.sessionToken;
} catch (error) {
// Proceed without token (OTP fallback)
}Generate a fresh token and run SNA before your Prefill request (and get a fresh token again before Onboarding):
const { sessionToken: diSessionToken } = await RnSigmaDevice.getSessionToken();
// performSilentNetworkAuth is the call that actually runs SNA. Mobile number in
// E.164 format; await it so the result is ready for decisioning.
await RnSigmaDevice.performSilentNetworkAuth('+15551234567').catch(() => {});