function getServiceClassAuthOrigin(serviceClass) {
  if (
    !serviceClass ||
    !serviceClass.prototype ||
    !(serviceClass.prototype instanceof BaseService)
  ) {
    throw new TypeError(
      `Invalid serviceClass ${serviceClass}: Must be an instance of BaseService.`,
    )
  }
  if (serviceClass.auth.authorizedOrigins) {
    return serviceClass.auth.authorizedOrigins
  } else {
    return [
      config.public.services[serviceClass.auth.serviceKey].authorizedOrigins,
    ]
  }
}
Returns the first auth origin found for a provided service class.

@param {BaseService} serviceClass The service class to find the authorized origins.
@throws {TypeError} - Throws a TypeError if the input `serviceClass` is not an instance of BaseService.
@returns {string} First auth origin found.

@example
// Example usage:
getServiceClassAuthOrigin(Obs)
// outputs 'https://api.opensuse.org'