async function authenticate(username, password) {
  // For the purpose of this example use httpbin (https://httpbin.org) and send a basic authentication request.
  // (Only a password of `Testing123` will succeed)
  const authEndpoint = `https://httpbin.org/basic-auth/${username}/Testing123`;
  const response = await fetch(authEndpoint, {
    headers: {
      Authorization: 'Basic ' + Buffer.from(username + ":" + password).toString('base64')
    }
  });

  if (response.status === 200) {
    return true;
  } else if (response.status === 401) {
    return false
  } else {
    throw new Error(`invalid response returned from ${authEndpoint} status code ${response.status}`)
  }
}
Authenticate the provided credentials.
TODO(DEVELOPER): In production you'll need to update this function so that it authenticates with your own credentials system.
@returns {Promise<boolean>} success or failure.