Use Provider

Try changing it to use a provider instead of a factory, so it can be accessed from config block.