Martin-
Martin-

Reputation: 927

Sonata User Bundle - redirect loop

I have installed both FOSUserBundle and Sonata Admin bundle

First FOSUserBundle worked perfect, with both profile, login and logout. Now with Sonata Admin bundle, I can CRUD my entities.

Now I wanted them integrated with login to my backend.

Now when I go to /admin/dashboard it redirects to /admin/login and then a infinity redirect loop.

I have properly messed up the security, and I really dont understand it that well.

security.yml : https://gist.github.com/lsv/4740268

routing.yml : https://gist.github.com/lsv/4740284

config.yml : https://gist.github.com/lsv/4740291

dev.log : https://gist.github.com/lsv/4740301

Can somebody help?

Upvotes: 1

Views: 1927

Answers (1)

krojew
krojew

Reputation: 1336

Add

- { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/logout$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/login-check$, role: IS_AUTHENTICATED_ANONYMOUSLY }

to security.yml

Upvotes: 2

Related Questions