nativescript-safetynet-helper
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

NativeScript SafetyNet Helper

A NativeScript module for checking device integrity using the SafetyNet API. It uses the SafetyNet Helper library

Installation

From the command prompt go to your app's root folder and execute:

tns plugin add nativescript-safetynet-helper

Usage

Here are the supported functions:

function: requestTest

JavaScript

let SafetyNetHelper = require('nativescript-safetynet-helper').SafetyNetHelper

let helper = new SafetyNetHelper(this._apiKey)

helper.requestTest((err, result) => {
    if (err) {
        console.log(err)
        this.updateMessage(err);
        return
    }

    console.log(`Basic Integrity - ${result.basicIntegrity}, CTS Profile Match - ${result.ctsProfileMatch}`)
});

TypeScript

import { SafetyNetHelper } from 'nativescript-safetynet-helper';

let helper = new SafetyNetHelper(this._apiKey)

helper.requestTest((err, result) => {
    if (err) {
        console.log(err)
        this.updateMessage(err);
        return
    }

    console.log(`Basic Integrity - ${result.basicIntegrity}, CTS Profile Match - ${result.ctsProfileMatch}`)
});

Thanks

Scott Alexander-Bown for his contributions to SafetyNet Helper

Package Sidebar

Install

npm i nativescript-safetynet-helper

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • chimon2000