<p dir="auto">I am working in a Symfony 2.8 and I am using latest FOSUser (<code class="notranslate">~2.0@dev</code>). This is how the <code class="notranslate">security.yml</code> looks like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="security:
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username_email

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            pattern: ^/
            anonymous: ~
            logout: true

            form_login:
                provider: fos_userbundle
                csrf_provider: security.csrf.token_manager
                login_path: fos_user_security_login
                check_path: fos_user_security_check

            remember_me:
                secret:   '%secret%'
                lifetime: 604800 # 1 week in seconds
                path:     /

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }

        - { path: ^/admin/, role: ROLE_ADMIN }"><pre class="notranslate"><code class="notranslate">security:
    encoders:
        FOS\UserBundle\Model\UserInterface: bcrypt

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username_email

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        main:
            pattern: ^/
            anonymous: ~
            logout: true

            form_login:
                provider: fos_userbundle
                csrf_provider: security.csrf.token_manager
                login_path: fos_user_security_login
                check_path: fos_user_security_check

            remember_me:
                secret:   '%secret%'
                lifetime: 604800 # 1 week in seconds
                path:     /

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }

        - { path: ^/admin/, role: ROLE_ADMIN }
</code></pre></div>
<p dir="auto">Now take a look to this picture:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/627886/11888139/834147c8-a508-11e5-8120-e0687c2934bb.png"><img src="https://cloud.githubusercontent.com/assets/627886/11888139/834147c8-a508-11e5-8120-e0687c2934bb.png" alt="2015-12-17_21-49-03" style="max-width: 100%;"></a></p>
<p dir="auto">As you can see (1) the URI points to <code class="notranslate">app_dev.php</code> so I am working on DEV environment (2) user is authenticated (3) although <code class="notranslate">logout</code> link points to non DEV env as shown in (4) which cause wrong logout route. Is this a issue or I miss something in configuration?</p>
<p dir="auto">Hi!</p>
<p dir="auto">When logging out with developer toolbar link it dosn't work, mainly because the link goes to prod envirenment instead of dev (app_dev.php/)</p>
<p dir="auto">The project I'm working on:<br>
<a href="https://bitbucket.org/Richardh87/messenger/overview" rel="nofollow">https://bitbucket.org/Richardh87/messenger/overview</a></p>