Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues on toolbar when user is logged in and tries to logout #17060

Closed
reypm opened this issue Dec 18, 2015 · 1 comment
Closed

Issues on toolbar when user is logged in and tries to logout #17060

reypm opened this issue Dec 18, 2015 · 1 comment

Comments

@reypm
Copy link

reypm commented Dec 18, 2015

I am working in a Symfony 2.8 and I am using latest FOSUser (~2.0@dev). This is how the security.yml looks like:

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 }

Now take a look to this picture:

2015-12-17_21-49-03

As you can see (1) the URI points to app_dev.php so I am working on DEV environment (2) user is authenticated (3) although logout 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?

@xabbuh
Copy link
Member

xabbuh commented Dec 18, 2015

Thanks for reporting this bug @paquitodev. However, I close here as it is a duplicate of #17029 which will be fixed by #17048 and #17049.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants