I looked at the yii2 application a few days ago and noted that the username and passwords from the login form are published without encryption. How can I make my username and password more secure? I know that it \yii\helpers\Security::encrypt($data, $secretKey)will encrypt data and simulate, we can decrypt it. But how to use it as a login form?
This is my login form.
<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
<?= $form->field($model, 'username') ?>
<?= $form->field($model, 'password')->passwordInput() ?>
<div class="form-group">
<?= Html::submitButton('Login', ['class' => 'btn btn-info']) ?>
</div>
<?php ActiveForm::end(); ?>
How to handle encryption of user input here?
source
share