public function resetPassword(User $user, string $newPassword)
    {
        $this->enforcePasswordStrength($newPassword);

        $auth = $this->authenticationProvider->findByUserId($user->getId());
        if (!$auth) {
            throw new NoSuchUserException();
        }

        $hash = password_hash($newPassword, PASSWORD_DEFAULT);
        $auth->setHash($hash);
        $this->resetAuthenticationKey($auth);
        $this->authenticationProvider->update($auth);
    }