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