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