I have this website with a login form and after I successfully logged in, I am redirected to the index. But when I click the back button, it lets me still view the login for
With symfony 4 you can solve it with allow_if :
access_control: - { path: /login, allow_if: "!is_authenticated()" }
here's the list of expressions available within allow_if string http://symfony.com/doc/current/security/expressions.html#security-expression-variables