0
votes

In my Symfony project I have a members zone accessible only by logged users then I write this in my security.yml (access_control):

{ path: ^/membre/, role: IS_AUTHENTICATED_REMEMBERED }

I did too a form with fos_user_security_check action and a _target_path = detail_page_membre.

When I try to log my user, I was redirected to / and in my log I have this:

User has been authenticated successfully. {"username":"toto"} []
Matched route "detail_page_membre".
Populated the TokenStorage with an anonymous Token.
Access denied, the user is not fully authenticated; redirecting to authentication entry point.

I don't have write any firewalls maybe it's this?

1
Could you maybe show your complete security.yml? - dbrumann
Yes it here : pastebin.com/NEbUi28Z - Topheur

1 Answers

0
votes

This issue often happens because of the session:

check your session configuration under framework in config.php file:

framework:
    session:
        # handler_id set to null will use default session handler from php.ini
        handler_id:  ~

Read more:

  1. Logging in redirects to the login page with no errors

  2. Symfony2 - Access is denied (user is not fully authenticated)