async function generateApiKey() {
  const apiKey = (await randomBytes(Math.ceil(API_KEY_LENGTH / 2))).toString('hex').slice(0, API_KEY_LENGTH);
  const apiKeyHash = hashRefreshToken(apiKey);

  return {
    apiKey,
    apiKeyHash,
  };
}
@private
@description Generate a refresh token and its hash.
@example
const { apiKey, apiKeyHash } = await generateApiKey();
@returns {Promise} Resolving with apiKey and apiKeyHash.