code: function generateNonce(length) {
    return generateSecureRandom(length).then((nonce) => {
      const nonceString = base64js.fromByteArray(nonce);
      return nonceString;
    });
  }
docs: Generate the nonce using react-native-securerandom
  @method generateNonce
  @param  {int} length
  @return  {Promise}