services:
    knpu.oauth2.provider_factory:
        class: KnpU\OAuth2ClientBundle\DependencyInjection\ProviderFactory
        arguments:
            - '@app.url_generator.host_aware'

    app.url_generator.host_aware:
        class: App\Service\Social\HostAwareUrlGenerator
        arguments:
            - '@router'
            - '@app.url_generator.portal'

    app.social.client.facebook:
        class: App\Service\Social\FacebookClient
        arguments:
            - '@knpu.oauth2.client.facebook'

    App\Service\Social\FacebookClient:
        alias: app.social.client.facebook

    app.social.user_updater.facebook:
        class: App\Service\Social\FacebookUserUpdater

    app.social.client.google:
        class: App\Service\Social\GoogleClient
        arguments:
            - '@knpu.oauth2.client.google'

    App\Service\Social\GoogleClient:
        alias: app.social.client.google

    app.social.user_updater.google:
        class: App\Service\Social\GoogleUserUpdater
