couldn't we get rid of the `domain` parameter since we can get it from the `ProviderConfig` instance?