title: Yii2: How exactly does user authentication works?
body: <p>I don't understand <code>Authentication</code> in <code>Yii2</code>. In <code>Yii 1</code> there was an identity class where we need to work with the <code>authentication()</code> method and call <code>CWebUser::login()</code> to achieve our goals.</p>
  
  <p>What are the main processes of authentication in <code>Yii 2</code>? <strong>And how does it work exactly?</strong> </p>
  
  <p>Can you please explain the following:</p>
  
  <ul>
  <li>All the steps required to complete authentication.</li>
  <li>Required database fields or schema.</li>
  <li>How to authenticate multiple user types.</li>
  <li>What may be a few other things I need to consider?</li>
  </ul>