Теперь на этапе включения TOTP код может истечь в течение 2 периодов

This commit is contained in:
ErickSkrauch
2017-11-20 20:48:43 +03:00
parent dab0ab4cba
commit 47b6761f78
3 changed files with 13 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ class EnableTwoFactorAuthForm extends AccountActionForm {
return [
['account', 'validateOtpDisabled'],
['totp', 'required', 'message' => E::TOTP_REQUIRED],
['totp', TotpValidator::class, 'account' => $this->getAccount()],
['totp', TotpValidator::class, 'account' => $this->getAccount(), 'window' => 2],
['password', PasswordRequiredValidator::class, 'account' => $this->getAccount()],
];
}