Symfony3 No route found for "get / logout"

I tilt the seam to get logout to work with symfony3. I follow the symfony SecurityBundle documentation, and as far as I can tell, my configuration files exist there as a specification, but when I go to /logout I get the following answer:

No route found for "GET /logout" (from "http://localhost:8000/admin") .

Any ideas on what might be my problem?

My security.yml:

 security: encoders: AppBundle\Entity\User: algorithm: bcrypt Symfony\Component\Security\Core\User\User: plaintext providers: chain_provider: chain: providers: [in_memory, database_provider] in_memory: memory: users: test: password: test roles: 'ROLE_ADMIN' admin: password: admin roles: 'ROLE_ADMIN' database_provider: entity: class: AppBundle:User property: email firewalls: dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false main: anonymous: true logout: true form_login: check_path: /login login_path: /login default_target_path: /login always_use_default_target_path: true logout: path: /logout target: /login 
+5
source share
1 answer

It's just that I almost deleted the question, but I think that a well-configured security.yml can be a good example for others who have problems.

just add a route to route.yml

 # app/config/routing.yml logout: path: /logout 
+10
source

Source: https://habr.com/ru/post/1246314/


All Articles