I have a security.yml
like a:
security:
firewalls:
first_area:
pattern: ^/someStr
********
second_area:
pattern: ^/otherStr
********
And I can login to user in the same firewall section, but I can't login to user in the other firewall section. I do it like this:
$token = new UsernamePasswordToken(user, null, 'second_area', userRoles);
$security->setToken($token);