0
votes

I authenticate users from a database through my own login form. Everything seems to work fine but when, after entering the good username and the good password, I arrive on the home page, I can see, in Symfony toolbar, that the user is not really authenticated (it is yellow, I have the array of roles, the username and Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken class) but authenticated is NO.

What do I miss to finish this authentication ?

Thank you

1
can you put some codeAnas EL KORCHI
Please provide some code (especially the part where you create the token for the user is important).xabbuh
no code to create the token.. I use the symfony UsernamePasswordToken . It is in the library and called automatically after the login_checkmlwacosmos
I just have my user class and my provider.. that's itmlwacosmos
use Guard. It simplifies things enormously. (You dont need a knp subscription to view the transcript)DevDonkey

1 Answers

0
votes

I found it. Maybe it can help someone.

To fully authenticate the use you have some rules to add access_control in the secureity.yml file and everything is fine like:

- { path: ^/, roles: ROLE_USER }