title: Login with username or email with Cakephp 3
body: <p>I want to do a login with username or email. So I want to change Auth fields dynamically.</p>
  
  <p>How can I modify $this->Auth fields as Cakehp 2 did?</p>
  
  <p>In cakephp 2 you could do:</p>
  
  <pre class="lang-php prettyprint-override"><code>$this-&gt;Auth-&gt;authenticate = array(
      'Form' =&gt; array(
          'fields' =&gt; array('username' =&gt; 'email', 'password' =&gt; 'password'),
      ),
  );
  </code></pre>
  
  <p>I've tried to change authenticate like this but it doesn't work:</p>
  
  <pre class="lang-php prettyprint-override"><code>$this-&gt;Auth-&gt;config('authenticate', [
      'Form' =&gt; [
          'fields' =&gt; ['username' =&gt; 'email', 'password' =&gt; 'password']
      ]
  ]);
  </code></pre>
  
  <p>Thanks!</p>