Skip to content

Unable to find the controller for path "/login_check", in some cases #70

@mikael-s

Description

@mikael-s

I use Symfony 2.2.11, and the BeSimpleSsoAuth bundle (ref 4ba8ada) for the SSO-CAS authentication.

When I logout, I'm correctly redirected to the logout page of the SSO. Then the SSO redirects me to the /login_check on my webapp and that finally redirects me to the login page. That's (almost) fine for me. The “almost” comes from the fact that I don't understand why I'm redirected to the login_check, rather than the root given that my security.yml file contains:

firewalls:
    people:
        pattern: ^/
        switch_user: true
        trusted_sso:
            manager: my_cas
            login_action: false
            logout_action: false
            create_users: false
        logout:
            path:   /logout
            target: /

access_control:
    - { path: ^/owner/*, roles: ROLE_OWNER }
    - { path: ^/user/*, roles: ROLE_USER }

I thought the target would mean where the logout page should redirect. There is an additional problem: if I happen to log in again from the page I've been redirected to, then I will be directly redirected to /login_check which will give the following error:

Unable to find the controller for path "/login_check". Maybe you forgot to add the matching route in your routing configuration?

But if I directly access to the root of my app (let's say http://localhost/test/web/app_dev.php), I'm being redirected to:

In that case, I access /login_check without any trouble, compared to the other case where I have an error. What is the difference? And, side question, why am I redirected to /login_check after logout?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions