title: [Symfony 5]Confirmation message after logout
body: <p>On Symfony 5, using the built-in login system, it seems impossible to add a confirmation message after logout. I have followed strictly the steps described on <a href="https://symfony.com/doc/current/security.html#logging-out" rel="nofollow noreferrer">the official website</a>. Unfortunately, the method logout inside the SecurityController is useless. I'm redirected directly on the login page.</p>
  
  <p>Here you will have my security.yaml file :</p>
  
  <pre><code>security:
  encoders:
      App\Entity\User:
          algorithm: auto
  
  
  # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
  providers:
      # used to reload user from session &amp; other features (e.g. switch_user)
      app_user_provider:
          entity:
              class: App\Entity\User
              property: email
      # used to reload user from session &amp; other features (e.g. switch_user)
  firewalls:
      dev:
          pattern: ^/(_(profiler|wdt)|css|images|js)/
          security: false
      main:
          anonymous: lazy
          provider: app_user_provider
          guard:
              authenticators:
                  - App\Security\LoginFormAuthenticator
          logout:
              path: logout
              target: login
  
          remember_me:
              secret:   '%kernel.secret%'
              lifetime: 604800 # 1 week in seconds
              path:     home
              always_remember_me: true
  
          # activate different ways to authenticate
          # https://symfony.com/doc/current/security.html#firewalls-authentication
  
          # https://symfony.com/doc/current/security/impersonating_user.html
          # switch_user: true
  
  # Easy way to control access for large sections of your site
  # Note: Only the *first* access control that matches will be used
  access_control:
      - { path: ^/logout$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      - { path: ^/, roles: IS_AUTHENTICATED_FULLY }
      - { path: ^/admin, roles: [IS_AUTHENTICATED_FULLY, ROLE_ADMIN] }
      - { path: ^/profile, roles: [IS_AUTHENTICATED_FULLY, ROLE_USER] }
  </code></pre>
  
  <p>And the Controller :</p>
  
  <pre><code>&lt;?php
  
  namespace App\Controller;
  
  use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  use Symfony\Component\HttpFoundation\Response;
  use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  
  class SecurityController extends AbstractController
  {
      public function login(AuthenticationUtils $authenticationUtils): Response
      {
          if ($this-&gt;getUser()) {
              return $this-&gt;redirectToRoute('home');
          }
  
          // get the login error if there is one
          $error = $authenticationUtils-&gt;getLastAuthenticationError();
  
          return $this-&gt;render('security/login.html.twig', ['last_username' =&gt; null, 'error' =&gt; $error]);
      }
  
      public function logout()
      {
          throw new \Exception('Don\'t forget to activate logout in security.yaml');
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>Thank you for your help !</p>