title: Symfony cant login without session.auto_start=1
body: <p>I have created an application with a login form.
  I have followed these instructions: <a href="https://symfony.com/doc/current/security/form_login_setup.html" rel="nofollow noreferrer">https://symfony.com/doc/current/security/form_login_setup.html</a></p>
  <p>However, if I want to log in via a POST request, the POST does not work.<br />
  In the LoginFormAuthenticator the login token is not validated.</p>
  <pre><code>csrfTokenManager-&gt;isTokenValid($token)
  </code></pre>
  <p>I discovered that the user gets a session.</p>
  <pre><code>csrfTokenManager-&gt;isTokenValid($token)
  </code></pre>
  <p>now returns true</p>
  <p>If I set session.auto_start= to 1 in the PHP.ini file session.auto_start= sessions are started.</p>
  <p>But Symfony does not recommend session.auto_start=1. How can I solve this problem ?</p>
  <p>The solution for my problem:</p>
  <p>Result of command <code>php bin/console debug:config framework session</code></p>
  <p>Result:</p>
  <pre><code>enabled: true
  storage_id: session.storage.native
  handler_id: session.handler.native_file
  cookie_httponly: true
  cookie_samesite: null
  gc_probability: 1
  save_path: '%kernel.cache_dir%/sessions'
  metadata_update_threshold: 0
  </code></pre>
  <p>Use the output in the</p>
  <blockquote>
  <p>config/packages/framework.yaml</p>
  </blockquote>
  <p>file.</p>