isPlayServicesAvailable

Checks if Google Play Services is available and up to date

isPlayServicesAvailable(): Promise
Returns
Promise:

generateNonce

Generate the nonce using react-native-securerandom

generateNonce(length: int): Promise
Parameters
length (int)
Returns
Promise:

sendAttestationRequest

Send the attestation request

sendAttestationRequest(nonce: String, apiKey: String): Promise
Parameters
nonce (String) Randomly generated nonce
apiKey (String) API key from Google APIs
Returns
Promise:

verifyAttestationResponse

Verify the attestation response Checks if the original nonce matches the nonce in the response, ctsProfileMatch is true, and basicIntegrity is true If any of those conditions are not met, an error is thrown

verifyAttestationResponse(originalNonce: String, response: Object): Promise
Parameters
originalNonce (String) Nonce originally provided to sendAttestationRequest
response (Object) Response from sendAttestationRequest
Name Description
response.nonce String Nonce in response from sendAttestationRequest
response.ctsProfileMatch bool Device matches a device that has passed Android Compatibility Testing
response.basicIntegrity bool Device has not been tampered with
Returns
Promise:

sendAndVerifyAttestation

Wrapper for sendAttestationRequest and verifyAttestationResponse

sendAndVerifyAttestation(nonce: String, apiKey: String): Promise
Parameters
nonce (String) Randomly generated nonce
apiKey (String) API key from Google APIs
Returns
Promise:

sendAttestationRequestJWT

Send the attestation request. Returns original JWT as result.

sendAttestationRequestJWT(nonce: String, apiKey: String): Promise
Parameters
nonce (String) Randomly generated nonce
apiKey (String) API key from Google APIs
Returns
Promise: