mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Поле token в контексте otp токенов переименовано в totp
This commit is contained in:
@ -52,10 +52,10 @@ class TotpValidator extends Validator {
|
||||
try {
|
||||
$totp = TOTP::create($this->account->otp_secret);
|
||||
if (!$totp->verify((string)$value, $this->getTimestamp(), $this->window)) {
|
||||
return [E::OTP_TOKEN_INCORRECT, []];
|
||||
return [E::TOTP_INCORRECT, []];
|
||||
}
|
||||
} catch (RangeException $e) {
|
||||
return [E::OTP_TOKEN_INCORRECT, []];
|
||||
return [E::TOTP_INCORRECT, []];
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user