В laravel 6 у брокера паролей теперь есть следующее для ограничения сброса пароля (https://github.com/laravel/framework/blob/6.x/src/Illuminate/Auth/Passwords/PasswordBroker.php#L58)
public function sendResetLink(array $credentials)
{
// First we will check to see if we found a user at the given credentials and
// if we did not we will redirect back to this current URI with a piece of
// "flash" data in the session to indicate to the developers the errors.
$user = $this->getUser($credentials);
if (is_null($user)) {
return static::INVALID_USER;
}
if (method_exists($this->tokens, 'recentlyCreatedToken') &&
$this->tokens->recentlyCreatedToken($user)) {
return static::RESET_THROTTLED;
}
// Once we have the reset token, we are ready to send the message out to this
// user with a link to reset their password. We will then redirect back to
// the current URI having nothing set in the session to indicate errors.
$user->sendPasswordResetNotification(
$this->tokens->create($user)
);
return static::RESET_LINK_SENT;
}
Однако, когда я неоднократно отправляю сброс пароля, почему сброс пароля не регулируется - я все еще получаю уведомления о сбросе?
Я заметил, что метод recentlyCreatedToken
не существует в TokenRepositoryInterface в версии 6.x https://github.com/laravel/framework/blob/6.x/src/Illuminate/Auth/Passwords/TokenRepositoryInterface.php
Но был добавлен в версии 7.x
Это только функция v7.x или мне нужно что-то сделать, что я упускаю?