services:
    r_u2f_two_factor.authenticator:
        class: R\U2FTwoFactorBundle\Security\TwoFactor\Prodiver\U2F\U2FAuthenticator
        arguments:
            - '@request_stack'
    r_u2f_two_factor.provider:
        class: R\U2FTwoFactorBundle\Security\TwoFactor\Prodiver\U2F\TwoFactorProvider
        arguments:
            - '@r_u2f_two_factor.authenticator'
            - '@templating'
            - '%r_u2f_two_factor.formtemplate%'
            - '%r_u2f_two_factor.authcodeparameter%'
        tags:
            - { name: scheb_two_factor.provider, alias: u2f_two_factor }

services:
    R\U2FTwoFactorBundle\Security\TwoFactor\Provider\U2F\U2FAuthenticator:
        arguments:
            - '@request_stack'
    R\U2FTwoFactorBundle\Security\TwoFactor\Provider\U2F\TwoFactorProvider:
        arguments:
            - '@R\U2FTwoFactorBundle\Security\TwoFactor\Provider\U2F\U2FAuthenticator'
            - '@templating'
            - '%r_u2f_two_factor.formtemplate%'
            - '%r_u2f_two_factor.authcodeparameter%'
        tags:
            - { name: scheb_two_factor.provider, alias: u2f_two_factor }

Use FQCN as service name
Use FQCN as service name

scheb/two-factor-bundle requires Symfony 3.4, so we can use a FQCN as a service name: https://symfony.com/blog/new-in-symfony-3-3-optional-class-for-named-services.