You must configure the check path to be handled by the firewall using form_login in your security firewall configuration

前端 未结 4 897
囚心锁ツ
囚心锁ツ 2021-01-04 11:46

i have webservice which is provider for my \"regular\" users. I want to use FosUserBundle for my administrators. Above is my security configuration. regular users login work

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-04 12:27

    In some instances, I can see that this is caused by default security settings generated when symfony is installed by composer.

    In my case, in my security.yml, I had this section:

    default:
        anonymous: ~
    

    As this was working as a catch-all, it was interfering with FOSUserBundle's ability to handle the route. Just delete it or, if you have a route you've specified yourself, make sure it's not also handling the same URL path.

提交回复
热议问题